require('./sourcemap-register.js');/******/ (() => { // webpackBootstrap
/******/ var __webpack_modules__ = ({
/***/ 94822:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
const core = __importStar(__nccwpck_require__(42186));
const model_1 = __nccwpck_require__(41359);
const cli_1 = __nccwpck_require__(55651);
const mac_builder_1 = __importDefault(__nccwpck_require__(39364));
const platform_setup_1 = __importDefault(__nccwpck_require__(64423));
function runMain() {
return __awaiter(this, void 0, void 0, function* () {
try {
model_1.Action.checkCompatibility();
model_1.Cache.verify();
const { workspace, actionFolder } = model_1.Action;
const buildParameters = yield model_1.BuildParameters.create();
const baseImage = new model_1.ImageTag(buildParameters);
if (buildParameters.cloudRunnerCluster &&
buildParameters.cloudRunnerCluster !== '' &&
buildParameters.cloudRunnerCluster !== 'local') {
yield model_1.CloudRunner.run(buildParameters, baseImage.toString());
}
else {
core.info('Building locally');
yield platform_setup_1.default.setup(buildParameters, actionFolder);
if (process.platform === 'darwin') {
mac_builder_1.default.run(actionFolder, workspace, buildParameters);
}
else {
yield model_1.Docker.run(baseImage, Object.assign({ workspace, actionFolder }, buildParameters));
}
}
// Set output
yield model_1.Output.setBuildVersion(buildParameters.buildVersion);
}
catch (error) {
core.setFailed(error.message);
}
});
}
const options = cli_1.CLI.SetupCli();
if (cli_1.CLI.isCliMode(options)) {
cli_1.CLI.RunCli(options);
}
else {
runMain();
}
/***/ }),
/***/ 89088:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
const path_1 = __importDefault(__nccwpck_require__(71017));
class Action {
static get supportedPlatforms() {
return ['linux', 'win32', 'darwin'];
}
static get isRunningLocally() {
return process.env.RUNNER_WORKSPACE === undefined;
}
static get isRunningFromSource() {
return path_1.default.basename(__dirname) === 'model';
}
static get canonicalName() {
return 'unity-builder';
}
static get rootFolder() {
if (Action.isRunningFromSource) {
return path_1.default.dirname(path_1.default.dirname(path_1.default.dirname(__filename)));
}
return path_1.default.dirname(path_1.default.dirname(__filename));
}
static get actionFolder() {
return `${Action.rootFolder}/dist`;
}
static get workspace() {
return process.env.GITHUB_WORKSPACE;
}
static checkCompatibility() {
const currentPlatform = process.platform;
if (!Action.supportedPlatforms.includes(currentPlatform)) {
throw new Error(`Currently ${currentPlatform}-platform is not supported`);
}
}
}
exports["default"] = Action;
/***/ }),
/***/ 43059:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
const core = __importStar(__nccwpck_require__(42186));
const semver = __importStar(__nccwpck_require__(11383));
class AndroidVersioning {
static determineVersionCode(version, inputVersionCode) {
if (!inputVersionCode) {
return AndroidVersioning.versionToVersionCode(version);
}
return inputVersionCode;
}
static versionToVersionCode(version) {
if (version === 'none') {
core.info(`Versioning strategy is set to ${version}, so android version code should not be applied.`);
return 0;
}
const parsedVersion = semver.parse(version);
if (!parsedVersion) {
core.warning(`Could not parse "${version}" to semver, defaulting android version code to 1`);
return 1;
}
// The greatest value Google Plays allows is 2100000000.
// Allow for 3 patch digits, 3 minor digits and 3 major digits.
const versionCode = parsedVersion.major * 1000000 + parsedVersion.minor * 1000 + parsedVersion.patch;
if (versionCode >= 2050000000) {
throw new Error(`Generated versionCode ${versionCode} is dangerously close to the maximum allowed number 2100000000. Consider a different versioning scheme to be able to continue updating your application.`);
}
core.info(`Using android versionCode ${versionCode}`);
return versionCode;
}
static determineSdkManagerParameters(targetSdkVersion) {
const parsedVersion = Number.parseInt(targetSdkVersion.slice(-2), 10);
return Number.isNaN(parsedVersion) ? '' : `platforms;android-${parsedVersion}`;
}
}
exports["default"] = AndroidVersioning;
/***/ }),
/***/ 80787:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
const nanoid_1 = __nccwpck_require__(17592);
const core = __importStar(__nccwpck_require__(42186));
const android_versioning_1 = __importDefault(__nccwpck_require__(43059));
const cloud_runner_constants_1 = __importDefault(__nccwpck_require__(91311));
const cloud_runner_namespace_1 = __importDefault(__nccwpck_require__(63287));
const input_1 = __importDefault(__nccwpck_require__(91933));
const platform_1 = __importDefault(__nccwpck_require__(9707));
const unity_versioning_1 = __importDefault(__nccwpck_require__(17146));
const versioning_1 = __importDefault(__nccwpck_require__(88729));
class BuildParameters {
static create() {
return __awaiter(this, void 0, void 0, function* () {
const buildFile = this.parseBuildFile(input_1.default.buildName, input_1.default.targetPlatform, input_1.default.androidAppBundle);
const editorVersion = unity_versioning_1.default.determineUnityVersion(input_1.default.projectPath, input_1.default.unityVersion);
const buildVersion = yield versioning_1.default.determineBuildVersion(input_1.default.versioningStrategy, input_1.default.specifiedVersion);
const androidVersionCode = android_versioning_1.default.determineVersionCode(buildVersion, input_1.default.androidVersionCode);
const androidSdkManagerParameters = android_versioning_1.default.determineSdkManagerParameters(input_1.default.androidTargetSdkVersion);
// Todo - Don't use process.env directly, that's what the input model class is for.
// ---
let unitySerial = '';
if (!process.env.UNITY_SERIAL) {
//No serial was present so it is a personal license that we need to convert
if (!process.env.UNITY_LICENSE) {
throw new Error(`Missing Unity License File and no Serial was found. If this
is a personal license, make sure to follow the activation
steps and set the UNITY_LICENSE GitHub secret or enter a Unity
serial number inside the UNITY_SERIAL GitHub secret.`);
}
unitySerial = this.getSerialFromLicenseFile(process.env.UNITY_LICENSE);
}
else {
unitySerial = process.env.UNITY_SERIAL;
}
core.setSecret(unitySerial);
// ---
return {
editorVersion,
customImage: input_1.default.customImage,
unitySerial,
runnerTempPath: process.env.RUNNER_TEMP,
targetPlatform: input_1.default.targetPlatform,
projectPath: input_1.default.projectPath,
buildName: input_1.default.buildName,
buildPath: `${input_1.default.buildsPath}/${input_1.default.targetPlatform}`,
buildFile,
buildMethod: input_1.default.buildMethod,
buildVersion,
androidVersionCode,
androidKeystoreName: input_1.default.androidKeystoreName,
androidKeystoreBase64: input_1.default.androidKeystoreBase64,
androidKeystorePass: input_1.default.androidKeystorePass,
androidKeyaliasName: input_1.default.androidKeyaliasName,
androidKeyaliasPass: input_1.default.androidKeyaliasPass,
androidTargetSdkVersion: input_1.default.androidTargetSdkVersion,
androidSdkManagerParameters,
customParameters: input_1.default.customParameters,
sshAgent: input_1.default.sshAgent,
gitPrivateToken: yield input_1.default.gitPrivateToken(),
chownFilesTo: input_1.default.chownFilesTo,
cloudRunnerCluster: input_1.default.cloudRunnerCluster,
awsBaseStackName: input_1.default.awsBaseStackName,
kubeConfig: input_1.default.kubeConfig,
githubToken: yield input_1.default.githubToken(),
cloudRunnerMemory: input_1.default.cloudRunnerMemory,
cloudRunnerCpu: input_1.default.cloudRunnerCpu,
kubeVolumeSize: input_1.default.kubeVolumeSize,
kubeVolume: input_1.default.kubeVolume,
postBuildSteps: input_1.default.postBuildSteps,
preBuildSteps: input_1.default.preBuildSteps,
customJob: input_1.default.customJob,
runNumber: input_1.default.runNumber,
branch: yield input_1.default.branch(),
// Todo - move this out of UserInput and into some class that determines additional information (as needed)
githubRepo: yield input_1.default.githubRepo(),
remoteBuildCluster: input_1.default.cloudRunnerCluster,
awsStackName: input_1.default.awsBaseStackName,
gitSha: input_1.default.gitSha,
logId: nanoid_1.customAlphabet(cloud_runner_constants_1.default.alphabet, 9)(),
buildGuid: cloud_runner_namespace_1.default.generateBuildName(input_1.default.runNumber, input_1.default.targetPlatform),
};
});
}
static parseBuildFile(filename, platform, androidAppBundle) {
if (platform_1.default.isWindows(platform)) {
return `${filename}.exe`;
}
if (platform_1.default.isAndroid(platform)) {
return androidAppBundle ? `${filename}.aab` : `${filename}.apk`;
}
return filename;
}
static getSerialFromLicenseFile(license) {
const startKey = ``;
const startIndex = license.indexOf(startKey) + startKey.length;
if (startIndex < 0) {
throw new Error(`License File was corrupted, unable to locate serial`);
}
const endIndex = license.indexOf(endKey, startIndex);
// Slice off the first 4 characters as they are garbage values
return Buffer.from(license.slice(startIndex, endIndex), 'base64').toString('binary').slice(4);
}
}
exports["default"] = BuildParameters;
/***/ }),
/***/ 97134:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
const core = __importStar(__nccwpck_require__(42186));
const fs_1 = __importDefault(__nccwpck_require__(57147));
const action_1 = __importDefault(__nccwpck_require__(89088));
const project_1 = __importDefault(__nccwpck_require__(88666));
class Cache {
static verify() {
if (!fs_1.default.existsSync(project_1.default.libraryFolder)) {
this.notifyAboutCachingPossibility();
}
}
static notifyAboutCachingPossibility() {
if (action_1.default.isRunningLocally) {
return;
}
core.warning(`
Library folder does not exist.
Consider setting up caching to speed up your workflow,
if this is not your first build.
`);
}
}
exports["default"] = Cache;
/***/ }),
/***/ 8731:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.GetAllCliModes = exports.GetCliFunctions = exports.CliFunction = void 0;
const targets = new Array();
function CliFunction(key, description) {
return function (target, propertyKey, descriptor) {
targets.push({
target,
propertyKey,
descriptor,
key,
description,
});
};
}
exports.CliFunction = CliFunction;
function GetCliFunctions(key) {
return targets.find((x) => x.key === key);
}
exports.GetCliFunctions = GetCliFunctions;
function GetAllCliModes() {
return targets.map((x) => {
return {
key: x.key,
description: x.description,
};
});
}
exports.GetAllCliModes = GetAllCliModes;
/***/ }),
/***/ 55651:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.CLI = void 0;
const commander_ts_1 = __nccwpck_require__(40451);
const __1 = __nccwpck_require__(41359);
const core = __importStar(__nccwpck_require__(42186));
const action_yaml_1 = __nccwpck_require__(11091);
const cloud_runner_logger_1 = __importDefault(__nccwpck_require__(22855));
const cli_decorator_1 = __nccwpck_require__(8731);
const remote_client_logger_1 = __nccwpck_require__(28082);
const cloud_runner_state_1 = __nccwpck_require__(70912);
const setup_cloud_runner_repository_1 = __nccwpck_require__(39656);
const SDK = __importStar(__nccwpck_require__(71786));
class CLI {
static RunCli(options) {
return __awaiter(this, void 0, void 0, function* () {
__1.Input.githubInputEnabled = false;
const results = cli_decorator_1.GetCliFunctions(options.mode);
if (results === undefined || results.length === 0) {
throw new Error('no CLI mode found');
}
cloud_runner_logger_1.default.log(`Entrypoint: ${results.key}`);
options.versioning = 'None';
__1.Input.cliOptions = options;
return yield results.target[results.propertyKey]();
});
}
static isCliMode(options) {
return options.mode !== undefined && options.mode !== '';
}
static SetupCli() {
const program = new commander_ts_1.Command();
program.version('0.0.1');
const properties = Object.getOwnPropertyNames(__1.Input);
core.info(`\n`);
core.info(`INPUT:`);
const actionYamlReader = new action_yaml_1.ActionYamlReader();
for (const element of properties) {
program.option(`--${element} <${element}>`, actionYamlReader.GetActionYamlValue(element));
if (__1.Input[element] !== undefined && __1.Input[element] !== '' && typeof __1.Input[element] !== `function`) {
core.info(`${element} ${__1.Input[element]}`);
}
}
core.info(`\n`);
program.option('-m, --mode ', cli_decorator_1.GetAllCliModes()
.map((x) => `${x.key} (${x.description})`)
.join(` | `));
program.parse(process.argv);
return program.opts();
}
static CLIBuild() {
return __awaiter(this, void 0, void 0, function* () {
const buildParameter = yield __1.BuildParameters.create();
const baseImage = new __1.ImageTag(buildParameter);
return yield __1.CloudRunner.run(buildParameter, baseImage.toString());
});
}
static runRemoteClientJob() {
return __awaiter(this, void 0, void 0, function* () {
const buildParameter = JSON.parse(process.env.BUILD_PARAMETERS || '{}');
remote_client_logger_1.RemoteClientLogger.log(`Build Params:
${JSON.stringify(buildParameter, undefined, 4)}
`);
cloud_runner_state_1.CloudRunnerState.setup(buildParameter);
yield setup_cloud_runner_repository_1.SetupCloudRunnerRepository.run();
});
}
static cachePush() {
return __awaiter(this, void 0, void 0, function* () { });
}
static cachePull() {
return __awaiter(this, void 0, void 0, function* () { });
}
static garbageCollectAws() {
return __awaiter(this, void 0, void 0, function* () {
process.env.AWS_REGION = __1.Input.region;
const CF = new SDK.CloudFormation();
const stacks = yield CF.listStacks().promise();
cloud_runner_logger_1.default.log(JSON.stringify(stacks, undefined, 4));
});
}
}
__decorate([
cli_decorator_1.CliFunction(`cli`, `runs a cloud runner build`)
], CLI, "CLIBuild", null);
__decorate([
cli_decorator_1.CliFunction(`remote-cli`, `sets up a repository, usually before a game-ci build`)
], CLI, "runRemoteClientJob", null);
__decorate([
cli_decorator_1.CliFunction(`cach-push`, `push to cache`)
], CLI, "cachePush", null);
__decorate([
cli_decorator_1.CliFunction(`cach-pull`, `pull from cache`)
], CLI, "cachePull", null);
__decorate([
cli_decorator_1.CliFunction(`garbage-collect-aws`, `garbage collect aws`)
], CLI, "garbageCollectAws", null);
exports.CLI = CLI;
/***/ }),
/***/ 38759:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.Caching = void 0;
const console_1 = __nccwpck_require__(96206);
const fs_1 = __importDefault(__nccwpck_require__(57147));
const path_1 = __importDefault(__nccwpck_require__(71017));
const __1 = __nccwpck_require__(41359);
const cloud_runner_logger_1 = __importDefault(__nccwpck_require__(22855));
const cloud_runner_state_1 = __nccwpck_require__(70912);
const cloud_runner_system_1 = __nccwpck_require__(66879);
const lfs_hashing_1 = __nccwpck_require__(31938);
const remote_client_logger_1 = __nccwpck_require__(28082);
class Caching {
static PushToCache(cacheFolder, sourceFolder, cacheKey) {
return __awaiter(this, void 0, void 0, function* () {
const startPath = process.cwd();
try {
if (!fs_1.default.existsSync(cacheFolder)) {
yield cloud_runner_system_1.CloudRunnerSystem.Run(`mkdir -p ${cacheFolder}`);
}
process.chdir(path_1.default.resolve(sourceFolder, '..'));
if (__1.Input.cloudRunnerTests) {
cloud_runner_logger_1.default.log(`Hashed cache folder ${yield lfs_hashing_1.LFSHashing.hashAllFiles(sourceFolder)} ${sourceFolder} ${path_1.default.basename(sourceFolder)}`);
}
if (__1.Input.cloudRunnerTests) {
yield cloud_runner_system_1.CloudRunnerSystem.Run(`ls ${path_1.default.basename(sourceFolder)}`);
}
yield cloud_runner_system_1.CloudRunnerSystem.Run(`zip ${cacheKey}.zip ${path_1.default.basename(sourceFolder)}`);
console_1.assert(fs_1.default.existsSync(`${cacheKey}.zip`), 'cache zip exists');
console_1.assert(fs_1.default.existsSync(path_1.default.basename(sourceFolder)), 'source folder exists');
yield cloud_runner_system_1.CloudRunnerSystem.Run(`mv ${cacheKey}.zip ${cacheFolder}`);
remote_client_logger_1.RemoteClientLogger.log(`moved ${cacheKey}.zip to ${cacheFolder}`);
console_1.assert(fs_1.default.existsSync(`${path_1.default.join(cacheFolder, cacheKey)}.zip`), 'cache zip exists inside cache folder');
if (__1.Input.cloudRunnerTests) {
yield cloud_runner_system_1.CloudRunnerSystem.Run(`ls ${cacheFolder}`);
}
}
catch (error) {
process.chdir(`${startPath}`);
throw error;
}
process.chdir(`${startPath}`);
});
}
static PullFromCache(cacheFolder, destinationFolder, cacheKey = ``) {
return __awaiter(this, void 0, void 0, function* () {
const startPath = process.cwd();
remote_client_logger_1.RemoteClientLogger.log(`Caching for ${path_1.default.basename(destinationFolder)}`);
try {
if (!fs_1.default.existsSync(cacheFolder)) {
fs_1.default.mkdirSync(cacheFolder);
}
if (!fs_1.default.existsSync(destinationFolder)) {
fs_1.default.mkdirSync(destinationFolder);
}
const latestInBranch = yield (yield cloud_runner_system_1.CloudRunnerSystem.Run(`ls -t "${cacheFolder}" | grep .zip$ | head -1`))
.replace(/\n/g, ``)
.replace('.zip', '');
process.chdir(cacheFolder);
const cacheSelection = cacheKey !== `` && fs_1.default.existsSync(`${cacheKey}.zip`) ? cacheKey : latestInBranch;
yield cloud_runner_logger_1.default.log(`cache key ${cacheKey} selection ${cacheSelection}`);
if (fs_1.default.existsSync(`${cacheSelection}.zip`)) {
const resultsFolder = `results${cloud_runner_state_1.CloudRunnerState.buildParams.buildGuid}`;
yield cloud_runner_system_1.CloudRunnerSystem.Run(`mkdir -p ${resultsFolder}`);
if (__1.Input.cloudRunnerTests) {
yield cloud_runner_system_1.CloudRunnerSystem.Run(`tree ${destinationFolder}`);
}
remote_client_logger_1.RemoteClientLogger.log(`cache item exists ${cacheFolder}/${cacheSelection}.zip`);
console_1.assert(`${fs_1.default.existsSync(destinationFolder)}`);
console_1.assert(`${fs_1.default.existsSync(`${cacheSelection}.zip`)}`);
const fullResultsFolder = path_1.default.join(cacheFolder, resultsFolder);
if (__1.Input.cloudRunnerTests) {
yield cloud_runner_system_1.CloudRunnerSystem.Run(`tree ${cacheFolder}`);
}
yield cloud_runner_system_1.CloudRunnerSystem.Run(`unzip ${cacheSelection}.zip -d ${path_1.default.basename(resultsFolder)}`);
remote_client_logger_1.RemoteClientLogger.log(`cache item extracted to ${fullResultsFolder}`);
console_1.assert(`${fs_1.default.existsSync(fullResultsFolder)}`);
const destinationParentFolder = path_1.default.resolve(destinationFolder, '..');
if (fs_1.default.existsSync(destinationFolder)) {
fs_1.default.rmSync(destinationFolder, { recursive: true, force: true });
}
yield cloud_runner_system_1.CloudRunnerSystem.Run(`mv "${fullResultsFolder}/${path_1.default.basename(destinationFolder)}" "${destinationParentFolder}"`);
if (__1.Input.cloudRunnerTests) {
yield cloud_runner_system_1.CloudRunnerSystem.Run(`tree ${destinationParentFolder}`);
}
}
else {
remote_client_logger_1.RemoteClientLogger.logWarning(`cache item ${cacheKey} doesn't exist ${destinationFolder}`);
if (cacheSelection !== ``) {
if (__1.Input.cloudRunnerTests) {
yield cloud_runner_system_1.CloudRunnerSystem.Run(`tree ${cacheFolder}`);
}
remote_client_logger_1.RemoteClientLogger.logWarning(`cache item ${cacheKey}.zip doesn't exist ${destinationFolder}`);
throw new Error(`Failed to get cache item, but cache hit was found: ${cacheSelection}`);
}
}
}
catch (error) {
process.chdir(`${startPath}`);
throw error;
}
process.chdir(`${startPath}`);
});
}
static handleCachePurging() {
if (process.env.PURGE_REMOTE_BUILDER_CACHE !== undefined) {
remote_client_logger_1.RemoteClientLogger.log(`purging ${cloud_runner_state_1.CloudRunnerState.purgeRemoteCaching}`);
fs_1.default.rmdirSync(cloud_runner_state_1.CloudRunnerState.cacheFolder, { recursive: true });
}
}
}
exports.Caching = Caching;
/***/ }),
/***/ 66879:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.CloudRunnerSystem = void 0;
const child_process_1 = __nccwpck_require__(32081);
const remote_client_logger_1 = __nccwpck_require__(28082);
class CloudRunnerSystem {
static Run(command, suppressError = false) {
return __awaiter(this, void 0, void 0, function* () {
for (const element of command.split(`\n`)) {
remote_client_logger_1.RemoteClientLogger.log(element);
}
return yield new Promise((promise) => {
let output = '';
const child = child_process_1.exec(command, (error, stdout, stderr) => {
if (error && !suppressError) {
throw error;
}
if (stderr) {
const diagnosticOutput = `${stderr.toString()}`;
remote_client_logger_1.RemoteClientLogger.logCliDiagnostic(diagnosticOutput);
output += diagnosticOutput;
return;
}
const outputChunk = `${stdout}`;
output += outputChunk;
});
child.on('close', function (code) {
remote_client_logger_1.RemoteClientLogger.log(`[Exit code ${code}]`);
if (code !== 0 && !suppressError) {
throw new Error(output);
}
const outputLines = output.split(`\n`);
for (const element of outputLines) {
remote_client_logger_1.RemoteClientLogger.log(element);
}
promise(output);
});
});
});
}
}
exports.CloudRunnerSystem = CloudRunnerSystem;
/***/ }),
/***/ 31938:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.LFSHashing = void 0;
const path_1 = __importDefault(__nccwpck_require__(71017));
const cloud_runner_state_1 = __nccwpck_require__(70912);
const cloud_runner_system_1 = __nccwpck_require__(66879);
const fs_1 = __importDefault(__nccwpck_require__(57147));
const console_1 = __nccwpck_require__(96206);
const __1 = __nccwpck_require__(41359);
const remote_client_logger_1 = __nccwpck_require__(28082);
class LFSHashing {
static createLFSHashFiles() {
return __awaiter(this, void 0, void 0, function* () {
try {
yield cloud_runner_system_1.CloudRunnerSystem.Run(`git lfs ls-files -l | cut -d ' ' -f1 | sort > .lfs-assets-guid`);
yield cloud_runner_system_1.CloudRunnerSystem.Run(`md5sum .lfs-assets-guid > .lfs-assets-guid-sum`);
console_1.assert(fs_1.default.existsSync(`.lfs-assets-guid-sum`));
console_1.assert(fs_1.default.existsSync(`.lfs-assets-guid`));
const lfsHashes = {
lfsGuid: fs_1.default
.readFileSync(`${path_1.default.join(cloud_runner_state_1.CloudRunnerState.repoPathFull, `.lfs-assets-guid`)}`, 'utf8')
.replace(/\n/g, ``),
lfsGuidSum: fs_1.default
.readFileSync(`${path_1.default.join(cloud_runner_state_1.CloudRunnerState.repoPathFull, `.lfs-assets-guid-sum`)}`, 'utf8')
.replace(/\n/g, ``),
};
if (__1.Input.cloudRunnerTests) {
remote_client_logger_1.RemoteClientLogger.log(lfsHashes.lfsGuid);
remote_client_logger_1.RemoteClientLogger.log(lfsHashes.lfsGuidSum);
}
return lfsHashes;
}
catch (error) {
throw error;
}
});
}
static hashAllFiles(folder) {
return __awaiter(this, void 0, void 0, function* () {
const startPath = process.cwd();
process.chdir(folder);
const result = yield (yield cloud_runner_system_1.CloudRunnerSystem.Run(`find -type f -exec md5sum "{}" + | sort | md5sum`))
.replace(/\n/g, '')
.split(` `)[0];
process.chdir(startPath);
return result;
});
}
}
exports.LFSHashing = LFSHashing;
/***/ }),
/***/ 28082:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.RemoteClientLogger = void 0;
const cloud_runner_logger_1 = __importDefault(__nccwpck_require__(22855));
class RemoteClientLogger {
static log(message) {
cloud_runner_logger_1.default.log(`[Client] ${message}`);
}
static logCliError(message) {
cloud_runner_logger_1.default.log(`[Client][Error] ${message}`);
}
static logCliDiagnostic(message) {
cloud_runner_logger_1.default.log(`[Client][Diagnostic] ${message}`);
}
static logWarning(message) {
cloud_runner_logger_1.default.logWarning(message);
}
}
exports.RemoteClientLogger = RemoteClientLogger;
/***/ }),
/***/ 39656:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.SetupCloudRunnerRepository = void 0;
const fs_1 = __importDefault(__nccwpck_require__(57147));
const cloud_runner_state_1 = __nccwpck_require__(70912);
const caching_1 = __nccwpck_require__(38759);
const lfs_hashing_1 = __nccwpck_require__(31938);
const cloud_runner_system_1 = __nccwpck_require__(66879);
const __1 = __nccwpck_require__(41359);
const remote_client_logger_1 = __nccwpck_require__(28082);
const path_1 = __importDefault(__nccwpck_require__(71017));
const console_1 = __nccwpck_require__(96206);
class SetupCloudRunnerRepository {
static run() {
return __awaiter(this, void 0, void 0, function* () {
try {
yield cloud_runner_system_1.CloudRunnerSystem.Run(`mkdir -p ${cloud_runner_state_1.CloudRunnerState.buildPathFull}`);
yield cloud_runner_system_1.CloudRunnerSystem.Run(`mkdir -p ${cloud_runner_state_1.CloudRunnerState.repoPathFull}`);
yield cloud_runner_system_1.CloudRunnerSystem.Run(`mkdir -p ${cloud_runner_state_1.CloudRunnerState.cacheFolderFull}`);
process.chdir(cloud_runner_state_1.CloudRunnerState.repoPathFull);
if (__1.Input.cloudRunnerTests) {
yield cloud_runner_system_1.CloudRunnerSystem.Run(`ls -lh`);
yield cloud_runner_system_1.CloudRunnerSystem.Run(`tree`);
}
yield SetupCloudRunnerRepository.cloneRepoWithoutLFSFiles();
if (__1.Input.cloudRunnerTests) {
yield cloud_runner_system_1.CloudRunnerSystem.Run(`ls -lh`);
yield cloud_runner_system_1.CloudRunnerSystem.Run(`tree`);
}
const lfsHashes = yield lfs_hashing_1.LFSHashing.createLFSHashFiles();
if (fs_1.default.existsSync(cloud_runner_state_1.CloudRunnerState.libraryFolderFull)) {
remote_client_logger_1.RemoteClientLogger.logWarning(`!Warning!: The Unity library was included in the git repository`);
}
yield caching_1.Caching.PullFromCache(cloud_runner_state_1.CloudRunnerState.lfsCacheFolderFull, cloud_runner_state_1.CloudRunnerState.lfsDirectoryFull, `${lfsHashes.lfsGuid}`);
yield SetupCloudRunnerRepository.pullLatestLFS();
yield caching_1.Caching.PushToCache(cloud_runner_state_1.CloudRunnerState.lfsCacheFolderFull, cloud_runner_state_1.CloudRunnerState.lfsDirectoryFull, `${lfsHashes.lfsGuid}`);
yield caching_1.Caching.PullFromCache(cloud_runner_state_1.CloudRunnerState.libraryCacheFolderFull, cloud_runner_state_1.CloudRunnerState.libraryFolderFull);
caching_1.Caching.handleCachePurging();
}
catch (error) {
throw error;
}
});
}
static cloneRepoWithoutLFSFiles() {
return __awaiter(this, void 0, void 0, function* () {
try {
process.chdir(`${cloud_runner_state_1.CloudRunnerState.repoPathFull}`);
remote_client_logger_1.RemoteClientLogger.log(`Initializing source repository for cloning with caching of LFS files`);
yield cloud_runner_system_1.CloudRunnerSystem.Run(`git config --global advice.detachedHead false`);
remote_client_logger_1.RemoteClientLogger.log(`Cloning the repository being built:`);
yield cloud_runner_system_1.CloudRunnerSystem.Run(`git lfs install --skip-smudge`);
yield cloud_runner_system_1.CloudRunnerSystem.Run(`git clone -b ${cloud_runner_state_1.CloudRunnerState.branchName} ${cloud_runner_state_1.CloudRunnerState.targetBuildRepoUrl} ${path_1.default.resolve(`..`, path_1.default.basename(cloud_runner_state_1.CloudRunnerState.repoPathFull))}`);
console_1.assert(fs_1.default.existsSync(`.git`));
remote_client_logger_1.RemoteClientLogger.log(`${cloud_runner_state_1.CloudRunnerState.buildParams.branch}`);
yield cloud_runner_system_1.CloudRunnerSystem.Run(`git checkout ${cloud_runner_state_1.CloudRunnerState.buildParams.branch}`);
console_1.assert(fs_1.default.existsSync(path_1.default.join(`.git`, `lfs`)), 'LFS folder should not exist before caching');
remote_client_logger_1.RemoteClientLogger.log(`Checked out ${process.env.GITHUB_SHA}`);
}
catch (error) {
throw error;
}
});
}
static pullLatestLFS() {
return __awaiter(this, void 0, void 0, function* () {
yield cloud_runner_system_1.CloudRunnerSystem.Run(`ls -lh ${cloud_runner_state_1.CloudRunnerState.lfsDirectoryFull}/..`);
process.chdir(cloud_runner_state_1.CloudRunnerState.repoPathFull);
yield cloud_runner_system_1.CloudRunnerSystem.Run(`git lfs pull`);
remote_client_logger_1.RemoteClientLogger.log(`pulled latest LFS files`);
console_1.assert(fs_1.default.existsSync(cloud_runner_state_1.CloudRunnerState.lfsDirectoryFull));
yield cloud_runner_system_1.CloudRunnerSystem.Run(`ls -lh ${cloud_runner_state_1.CloudRunnerState.lfsDirectoryFull}/..`);
});
}
}
exports.SetupCloudRunnerRepository = SetupCloudRunnerRepository;
/***/ }),
/***/ 28730:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.AWSBaseStack = void 0;
const cloud_runner_logger_1 = __importDefault(__nccwpck_require__(22855));
const core = __importStar(__nccwpck_require__(42186));
const fs = __importStar(__nccwpck_require__(57147));
const path_1 = __importDefault(__nccwpck_require__(71017));
const crypto = __nccwpck_require__(6113);
class AWSBaseStack {
constructor(baseStackName) {
this.baseStackName = baseStackName;
}
setupBaseStack(CF) {
var _a, _b, _c, _d, _e;
return __awaiter(this, void 0, void 0, function* () {
const baseStackName = this.baseStackName;
const baseStack = fs.readFileSync(path_1.default.join(__dirname, 'cloud-formations', 'base-setup.yml'), 'utf8');
// Cloud Formation Input
const describeStackInput = {
StackName: baseStackName,
};
const parametersWithoutHash = [
{ ParameterKey: 'EnvironmentName', ParameterValue: baseStackName },
];
const parametersHash = crypto
.createHash('md5')
.update(baseStack + JSON.stringify(parametersWithoutHash))
.digest('hex');
const parameters = [
...parametersWithoutHash,
...[{ ParameterKey: 'Version', ParameterValue: parametersHash }],
];
const updateInput = {
StackName: baseStackName,
TemplateBody: baseStack,
Parameters: parameters,
Capabilities: ['CAPABILITY_IAM'],
};
const createStackInput = {
StackName: baseStackName,
TemplateBody: baseStack,
Parameters: parameters,
Capabilities: ['CAPABILITY_IAM'],
};
const stacks = yield CF.listStacks({
StackStatusFilter: ['UPDATE_COMPLETE', 'CREATE_COMPLETE', 'ROLLBACK_COMPLETE'],
}).promise();
const stackNames = ((_a = stacks.StackSummaries) === null || _a === void 0 ? void 0 : _a.map((x) => x.StackName)) || [];
const stackExists = stackNames.includes(baseStackName) || false;
const describeStack = () => __awaiter(this, void 0, void 0, function* () {
return yield CF.describeStacks(describeStackInput).promise();
});
try {
if (!stackExists) {
cloud_runner_logger_1.default.log(`${baseStackName} stack does not exist (${JSON.stringify(stackNames)})`);
yield CF.createStack(createStackInput).promise();
cloud_runner_logger_1.default.log(`created stack (version: ${parametersHash})`);
}
const CFState = yield describeStack();
let stack = (_b = CFState.Stacks) === null || _b === void 0 ? void 0 : _b[0];
if (!stack) {
throw new Error(`Base stack doesn't exist, even after creation, stackExists check: ${stackExists}`);
}
const stackVersion = (_d = (_c = stack.Parameters) === null || _c === void 0 ? void 0 : _c.find((x) => x.ParameterKey === 'Version')) === null || _d === void 0 ? void 0 : _d.ParameterValue;
if (stack.StackStatus === 'CREATE_IN_PROGRESS') {
yield CF.waitFor('stackCreateComplete', describeStackInput).promise();
}
if (stackExists) {
cloud_runner_logger_1.default.log(`Base stack exists (version: ${stackVersion}, local version: ${parametersHash})`);
if (parametersHash !== stackVersion) {
cloud_runner_logger_1.default.log(`Attempting update of base stack`);
try {
yield CF.updateStack(updateInput).promise();
}
catch (error) {
if (error['message'].includes('No updates are to be performed')) {
cloud_runner_logger_1.default.log(`No updates are to be performed`);
}
else {
cloud_runner_logger_1.default.log(`Update Failed (Stack name: ${baseStackName})`);
cloud_runner_logger_1.default.log(error['message']);
}
cloud_runner_logger_1.default.log(`Continuing...`);
}
}
else {
cloud_runner_logger_1.default.log(`No update required`);
}
stack = (_e = (yield describeStack()).Stacks) === null || _e === void 0 ? void 0 : _e[0];
if (!stack) {
throw new Error(`Base stack doesn't exist, even after updating and creation, stackExists check: ${stackExists}`);
}
if (stack.StackStatus === 'UPDATE_IN_PROGRESS') {
yield CF.waitFor('stackUpdateComplete', describeStackInput).promise();
}
}
cloud_runner_logger_1.default.log('base stack is now ready');
}
catch (error) {
core.error(JSON.stringify(yield describeStack(), undefined, 4));
throw error;
}
});
}
}
exports.AWSBaseStack = AWSBaseStack;
/***/ }),
/***/ 83683:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.AWSError = void 0;
const cloud_runner_logger_1 = __importDefault(__nccwpck_require__(22855));
const core = __importStar(__nccwpck_require__(42186));
const __1 = __nccwpck_require__(41359);
class AWSError {
static handleStackCreationFailure(error, CF, taskDefStackName) {
return __awaiter(this, void 0, void 0, function* () {
cloud_runner_logger_1.default.log('aws error: ');
core.error(JSON.stringify(error, undefined, 4));
if (__1.Input.cloudRunnerTests) {
cloud_runner_logger_1.default.log('Getting events and resources for task stack');
const events = (yield CF.describeStackEvents({ StackName: taskDefStackName }).promise()).StackEvents;
cloud_runner_logger_1.default.log(JSON.stringify(events, undefined, 4));
}
});
}
}
exports.AWSError = AWSError;
/***/ }),
/***/ 85819:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.AWSJobStack = void 0;
const aws_templates_1 = __nccwpck_require__(6436);
const cloud_runner_logger_1 = __importDefault(__nccwpck_require__(22855));
const aws_error_1 = __nccwpck_require__(83683);
class AWSJobStack {
constructor(baseStackName) {
this.baseStackName = baseStackName;
}
setupCloudFormations(CF, buildGuid, image, entrypoint, commands, mountdir, workingdir, secrets) {
return __awaiter(this, void 0, void 0, function* () {
const taskDefStackName = `${this.baseStackName}-${buildGuid}`;
let taskDefCloudFormation = aws_templates_1.AWSTemplates.readTaskCloudFormationTemplate();
for (const secret of secrets) {
secret.ParameterKey = `${buildGuid.replace(/[^\dA-Za-z]/g, '')}${secret.ParameterKey.replace(/[^\dA-Za-z]/g, '')}`;
if (typeof secret.ParameterValue == 'number') {
secret.ParameterValue = `${secret.ParameterValue}`;
}
if (!secret.ParameterValue || secret.ParameterValue === '') {
secrets = secrets.filter((x) => x !== secret);
continue;
}
taskDefCloudFormation = aws_templates_1.AWSTemplates.insertAtTemplate(taskDefCloudFormation, 'p1 - input', aws_templates_1.AWSTemplates.getParameterTemplate(secret.ParameterKey));
taskDefCloudFormation = aws_templates_1.AWSTemplates.insertAtTemplate(taskDefCloudFormation, 'p2 - secret', aws_templates_1.AWSTemplates.getSecretTemplate(`${secret.ParameterKey}`));
taskDefCloudFormation = aws_templates_1.AWSTemplates.insertAtTemplate(taskDefCloudFormation, 'p3 - container def', aws_templates_1.AWSTemplates.getSecretDefinitionTemplate(secret.EnvironmentVariable, secret.ParameterKey));
}
const secretsMappedToCloudFormationParameters = secrets.map((x) => {
return { ParameterKey: x.ParameterKey.replace(/[^\dA-Za-z]/g, ''), ParameterValue: x.ParameterValue };
});
const parameters = [
{
ParameterKey: 'EnvironmentName',
ParameterValue: this.baseStackName,
},
{
ParameterKey: 'ImageUrl',
ParameterValue: image,
},
{
ParameterKey: 'ServiceName',
ParameterValue: taskDefStackName,
},
{
ParameterKey: 'Command',
ParameterValue: 'echo "this template should be overwritten when running a task"',
},
{
ParameterKey: 'EntryPoint',
ParameterValue: entrypoint.join(','),
},
{
ParameterKey: 'WorkingDirectory',
ParameterValue: workingdir,
},
{
ParameterKey: 'EFSMountDirectory',
ParameterValue: mountdir,
},
...secretsMappedToCloudFormationParameters,
];
let previousStackExists = true;
while (previousStackExists) {
previousStackExists = false;
const stacks = yield CF.listStacks().promise();
if (!stacks.StackSummaries) {
throw new Error('Faild to get stacks');
}
for (let index = 0; index < stacks.StackSummaries.length; index++) {
const element = stacks.StackSummaries[index];
if (element.StackName === taskDefStackName && element.StackStatus !== 'DELETE_COMPLETE') {
previousStackExists = true;
cloud_runner_logger_1.default.log(`Previous stack still exists: ${JSON.stringify(element)}`);
}
}
}
try {
yield CF.createStack({
StackName: taskDefStackName,
TemplateBody: taskDefCloudFormation,
Capabilities: ['CAPABILITY_IAM'],
Parameters: parameters,
}).promise();
cloud_runner_logger_1.default.log('Creating cloud runner job');
yield CF.waitFor('stackCreateComplete', { StackName: taskDefStackName }).promise();
}
catch (error) {
yield aws_error_1.AWSError.handleStackCreationFailure(error, CF, taskDefStackName);
throw error;
}
const taskDefResources = (yield CF.describeStackResources({
StackName: taskDefStackName,
}).promise()).StackResources;
const baseResources = (yield CF.describeStackResources({ StackName: this.baseStackName }).promise()).StackResources;
return {
taskDefStackName,
taskDefCloudFormation,
taskDefResources,
baseResources,
};
});
}
}
exports.AWSJobStack = AWSJobStack;
/***/ }),
/***/ 74668:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
const AWS = __importStar(__nccwpck_require__(71786));
const core = __importStar(__nccwpck_require__(42186));
const zlib = __importStar(__nccwpck_require__(59796));
const cloud_runner_logger_1 = __importDefault(__nccwpck_require__(22855));
const __1 = __nccwpck_require__(41359);
const cloud_runner_state_1 = __nccwpck_require__(70912);
const cloud_runner_statics_1 = __nccwpck_require__(90828);
const cloud_runner_build_command_process_1 = __nccwpck_require__(71899);
class AWSTaskRunner {
static runTask(taskDef, ECS, CF, environment, buildGuid, commands) {
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
return __awaiter(this, void 0, void 0, function* () {
const cluster = ((_b = (_a = taskDef.baseResources) === null || _a === void 0 ? void 0 : _a.find((x) => x.LogicalResourceId === 'ECSCluster')) === null || _b === void 0 ? void 0 : _b.PhysicalResourceId) || '';
const taskDefinition = ((_d = (_c = taskDef.taskDefResources) === null || _c === void 0 ? void 0 : _c.find((x) => x.LogicalResourceId === 'TaskDefinition')) === null || _d === void 0 ? void 0 : _d.PhysicalResourceId) || '';
const SubnetOne = ((_f = (_e = taskDef.baseResources) === null || _e === void 0 ? void 0 : _e.find((x) => x.LogicalResourceId === 'PublicSubnetOne')) === null || _f === void 0 ? void 0 : _f.PhysicalResourceId) || '';
const SubnetTwo = ((_h = (_g = taskDef.baseResources) === null || _g === void 0 ? void 0 : _g.find((x) => x.LogicalResourceId === 'PublicSubnetTwo')) === null || _h === void 0 ? void 0 : _h.PhysicalResourceId) || '';
const ContainerSecurityGroup = ((_k = (_j = taskDef.baseResources) === null || _j === void 0 ? void 0 : _j.find((x) => x.LogicalResourceId === 'ContainerSecurityGroup')) === null || _k === void 0 ? void 0 : _k.PhysicalResourceId) || '';
const streamName = ((_m = (_l = taskDef.taskDefResources) === null || _l === void 0 ? void 0 : _l.find((x) => x.LogicalResourceId === 'KinesisStream')) === null || _m === void 0 ? void 0 : _m.PhysicalResourceId) || '';
const task = yield ECS.runTask({
cluster,
taskDefinition,
platformVersion: '1.4.0',
overrides: {
containerOverrides: [
{
name: taskDef.taskDefStackName,
environment,
command: ['-c', cloud_runner_build_command_process_1.CloudRunnerBuildCommandProcessor.ProcessCommands(commands, cloud_runner_state_1.CloudRunnerState.buildParams)],
},
],
},
launchType: 'FARGATE',
networkConfiguration: {
awsvpcConfiguration: {
subnets: [SubnetOne, SubnetTwo],
assignPublicIp: 'ENABLED',
securityGroups: [ContainerSecurityGroup],
},
},
}).promise();
cloud_runner_logger_1.default.log('Cloud runner job is starting');
const taskArn = ((_o = task.tasks) === null || _o === void 0 ? void 0 : _o[0].taskArn) || '';
try {
yield ECS.waitFor('tasksRunning', { tasks: [taskArn], cluster }).promise();
}
catch (error_) {
const error = error_;
yield new Promise((resolve) => setTimeout(resolve, 3000));
cloud_runner_logger_1.default.log(`Cloud runner job has ended ${(_p = (yield AWSTaskRunner.describeTasks(ECS, cluster, taskArn)).containers) === null || _p === void 0 ? void 0 : _p[0].lastStatus}`);
core.setFailed(error);
core.error(error);
}
cloud_runner_logger_1.default.log(`Cloud runner job is running`);
const output = yield this.streamLogsUntilTaskStops(ECS, CF, taskDef, cluster, taskArn, streamName);
const exitCode = (_q = (yield AWSTaskRunner.describeTasks(ECS, cluster, taskArn)).containers) === null || _q === void 0 ? void 0 : _q[0].exitCode;
cloud_runner_logger_1.default.log(`Cloud runner job exit code ${exitCode}`);
if (exitCode !== 0 && exitCode !== undefined) {
core.error(`job failed with exit code ${exitCode} ${JSON.stringify(yield ECS.describeTasks({ tasks: [taskArn], cluster }).promise(), undefined, 4)}`);
throw new Error(`job failed with exit code ${exitCode}`);
}
else {
cloud_runner_logger_1.default.log(`Cloud runner job has finished successfully`);
return output;
}
});
}
static describeTasks(ECS, clusterName, taskArn) {
var _a, _b;
return __awaiter(this, void 0, void 0, function* () {
const tasks = yield ECS.describeTasks({
cluster: clusterName,
tasks: [taskArn],
}).promise();
if ((_a = tasks.tasks) === null || _a === void 0 ? void 0 : _a[0]) {
return (_b = tasks.tasks) === null || _b === void 0 ? void 0 : _b[0];
}
else {
throw new Error('No task found');
}
});
}
static streamLogsUntilTaskStops(ECS, CF, taskDef, clusterName, taskArn, kinesisStreamName) {
var _a;
return __awaiter(this, void 0, void 0, function* () {
const kinesis = new AWS.Kinesis();
const stream = yield AWSTaskRunner.getLogStream(kinesis, kinesisStreamName);
let iterator = yield AWSTaskRunner.getLogIterator(kinesis, stream);
cloud_runner_logger_1.default.log(`Cloud runner job status is ${(_a = (yield AWSTaskRunner.describeTasks(ECS, clusterName, taskArn))) === null || _a === void 0 ? void 0 : _a.lastStatus}`);
const logBaseUrl = `https://${__1.Input.region}.console.aws.amazon.com/cloudwatch/home?region=${CF.config.region}#logsV2:log-groups/log-group/${taskDef.taskDefStackName}`;
cloud_runner_logger_1.default.log(`You can also see the logs at AWS Cloud Watch: ${logBaseUrl}`);
let shouldReadLogs = true;
let timestamp = 0;
let output = '';
while (shouldReadLogs) {
yield new Promise((resolve) => setTimeout(resolve, 1500));
const taskData = yield AWSTaskRunner.describeTasks(ECS, clusterName, taskArn);
({ timestamp, shouldReadLogs } = AWSTaskRunner.checkStreamingShouldContinue(taskData, timestamp, shouldReadLogs));
({ iterator, shouldReadLogs, output } = yield AWSTaskRunner.handleLogStreamIteration(kinesis, iterator, shouldReadLogs, taskDef, output));
}
return output;
});
}
static handleLogStreamIteration(kinesis, iterator, shouldReadLogs, taskDef, output) {
return __awaiter(this, void 0, void 0, function* () {
const records = yield kinesis
.getRecords({
ShardIterator: iterator,
})
.promise();
iterator = records.NextShardIterator || '';
({ shouldReadLogs, output } = AWSTaskRunner.logRecords(records, iterator, taskDef, shouldReadLogs, output));
return { iterator, shouldReadLogs, output };
});
}
static checkStreamingShouldContinue(taskData, timestamp, shouldReadLogs) {
if ((taskData === null || taskData === void 0 ? void 0 : taskData.lastStatus) !== 'RUNNING') {
if (timestamp === 0) {
cloud_runner_logger_1.default.log('## Cloud runner job stopped, streaming end of logs');
timestamp = Date.now();
}
if (timestamp !== 0 && Date.now() - timestamp > 30000) {
cloud_runner_logger_1.default.log('## Cloud runner status is not RUNNING for 30 seconds, last query for logs');
shouldReadLogs = false;
}
cloud_runner_logger_1.default.log(`## Status of job: ${taskData.lastStatus}`);
}
return { timestamp, shouldReadLogs };
}
static logRecords(records, iterator, taskDef, shouldReadLogs, output) {
if (records.Records.length > 0 && iterator) {
for (let index = 0; index < records.Records.length; index++) {
const json = JSON.parse(zlib.gunzipSync(Buffer.from(records.Records[index].Data, 'base64')).toString('utf8'));
if (json.messageType === 'DATA_MESSAGE') {
for (let logEventsIndex = 0; logEventsIndex < json.logEvents.length; logEventsIndex++) {
let message = json.logEvents[logEventsIndex].message;
if (json.logEvents[logEventsIndex].message.includes(`---${cloud_runner_state_1.CloudRunnerState.buildParams.logId}`)) {
cloud_runner_logger_1.default.log('End of log transmission received');
shouldReadLogs = false;
}
else if (message.includes('Rebuilding Library because the asset database could not be found!')) {
core.warning('LIBRARY NOT FOUND!');
}
message = `[${cloud_runner_statics_1.CloudRunnerStatics.logPrefix}] ${message}`;
if (__1.Input.cloudRunnerTests) {
output += message;
}
cloud_runner_logger_1.default.log(message);
}
}
}
}
return { shouldReadLogs, output };
}
static getLogStream(kinesis, kinesisStreamName) {
return __awaiter(this, void 0, void 0, function* () {
return yield kinesis
.describeStream({
StreamName: kinesisStreamName,
})
.promise();
});
}
static getLogIterator(kinesis, stream) {
return __awaiter(this, void 0, void 0, function* () {
return ((yield kinesis
.getShardIterator({
ShardIteratorType: 'TRIM_HORIZON',
StreamName: stream.StreamDescription.StreamName,
ShardId: stream.StreamDescription.Shards[0].ShardId,
})
.promise()).ShardIterator || '');
});
}
}
exports["default"] = AWSTaskRunner;
/***/ }),
/***/ 6436:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.AWSTemplates = void 0;
const fs = __importStar(__nccwpck_require__(57147));
class AWSTemplates {
static getParameterTemplate(p1) {
return `
${p1}:
Type: String
Default: ''
`;
}
static getSecretTemplate(p1) {
return `
${p1}Secret:
Type: AWS::SecretsManager::Secret
Properties:
Name: '${p1}'
SecretString: !Ref ${p1}
`;
}
static getSecretDefinitionTemplate(p1, p2) {
return `
- Name: '${p1}'
ValueFrom: !Ref ${p2}Secret
`;
}
static insertAtTemplate(template, insertionKey, insertion) {
const index = template.search(insertionKey) + insertionKey.length + '\n'.length;
template = [template.slice(0, index), insertion, template.slice(index)].join('');
return template;
}
static readTaskCloudFormationTemplate() {
return fs.readFileSync(`${__dirname}/cloud-formations/task-def-formation.yml`, 'utf8');
}
}
exports.AWSTemplates = AWSTemplates;
/***/ }),
/***/ 37569:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
const SDK = __importStar(__nccwpck_require__(71786));
const aws_task_runner_1 = __importDefault(__nccwpck_require__(74668));
const cloud_runner_logger_1 = __importDefault(__nccwpck_require__(22855));
const aws_job_stack_1 = __nccwpck_require__(85819);
const aws_base_stack_1 = __nccwpck_require__(28730);
const __1 = __nccwpck_require__(41359);
class AWSBuildEnvironment {
constructor(buildParameters) {
this.baseStackName = buildParameters.awsBaseStackName;
}
cleanupSharedResources(
// eslint-disable-next-line no-unused-vars
buildGuid,
// eslint-disable-next-line no-unused-vars
buildParameters,
// eslint-disable-next-line no-unused-vars
branchName,
// eslint-disable-next-line no-unused-vars
defaultSecretsArray) {
return __awaiter(this, void 0, void 0, function* () { });
}
setupSharedResources(
// eslint-disable-next-line no-unused-vars
buildGuid,
// eslint-disable-next-line no-unused-vars
buildParameters,
// eslint-disable-next-line no-unused-vars
branchName,
// eslint-disable-next-line no-unused-vars
defaultSecretsArray) {
return __awaiter(this, void 0, void 0, function* () { });
}
runTask(buildGuid, image, commands, mountdir, workingdir, environment, secrets) {
return __awaiter(this, void 0, void 0, function* () {
process.env.AWS_REGION = __1.Input.region;
const ECS = new SDK.ECS();
const CF = new SDK.CloudFormation();
cloud_runner_logger_1.default.log(`AWS Region: ${CF.config.region}`);
const entrypoint = ['/bin/sh'];
const startTimeMs = Date.now();
yield new aws_base_stack_1.AWSBaseStack(this.baseStackName).setupBaseStack(CF);
const taskDef = yield new aws_job_stack_1.AWSJobStack(this.baseStackName).setupCloudFormations(CF, buildGuid, image, entrypoint, commands, mountdir, workingdir, secrets);
let postRunTaskTimeMs;
let output = '';
try {
const postSetupStacksTimeMs = Date.now();
cloud_runner_logger_1.default.log(`Setup job time: ${Math.floor((postSetupStacksTimeMs - startTimeMs) / 1000)}s`);
output = yield aws_task_runner_1.default.runTask(taskDef, ECS, CF, environment, buildGuid, commands);
postRunTaskTimeMs = Date.now();
cloud_runner_logger_1.default.log(`Run job time: ${Math.floor((postRunTaskTimeMs - postSetupStacksTimeMs) / 1000)}s`);
}
finally {
yield this.cleanupResources(CF, taskDef);
const postCleanupTimeMs = Date.now();
if (postRunTaskTimeMs !== undefined)
cloud_runner_logger_1.default.log(`Cleanup job time: ${Math.floor((postCleanupTimeMs - postRunTaskTimeMs) / 1000)}s`);
}
return output;
});
}
cleanupResources(CF, taskDef) {
return __awaiter(this, void 0, void 0, function* () {
cloud_runner_logger_1.default.log('Cleanup starting');
yield CF.deleteStack({
StackName: taskDef.taskDefStackName,
}).promise();
yield CF.waitFor('stackDeleteComplete', {
StackName: taskDef.taskDefStackName,
}).promise();
cloud_runner_logger_1.default.log(`Deleted Stack: ${taskDef.taskDefStackName}`);
cloud_runner_logger_1.default.log('Cleanup complete');
});
}
}
exports["default"] = AWSBuildEnvironment;
/***/ }),
/***/ 90828:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.CloudRunnerStatics = void 0;
class CloudRunnerStatics {
}
exports.CloudRunnerStatics = CloudRunnerStatics;
CloudRunnerStatics.logPrefix = `Cloud-Runner-System`;
/***/ }),
/***/ 79144:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
const aws_1 = __importDefault(__nccwpck_require__(37569));
const cloud_runner_state_1 = __nccwpck_require__(70912);
const k8s_1 = __importDefault(__nccwpck_require__(25107));
const cloud_runner_logger_1 = __importDefault(__nccwpck_require__(22855));
const cloud_runner_step_state_1 = __nccwpck_require__(64854);
const workflow_composition_root_1 = __nccwpck_require__(54204);
const cloud_runner_error_1 = __nccwpck_require__(91477);
const task_parameter_serializer_1 = __nccwpck_require__(35346);
const core = __importStar(__nccwpck_require__(42186));
class CloudRunner {
static setup(buildParameters) {
cloud_runner_logger_1.default.setup();
cloud_runner_state_1.CloudRunnerState.setup(buildParameters);
CloudRunner.setupBuildPlatform();
const parameters = task_parameter_serializer_1.TaskParameterSerializer.readBuildEnvironmentVariables();
for (const element of parameters) {
core.setOutput(element.name, element.value);
}
}
static setupBuildPlatform() {
switch (cloud_runner_state_1.CloudRunnerState.buildParams.cloudRunnerCluster) {
case 'k8s':
cloud_runner_logger_1.default.log('Cloud Runner platform selected Kubernetes');
cloud_runner_state_1.CloudRunnerState.CloudRunnerProviderPlatform = new k8s_1.default(cloud_runner_state_1.CloudRunnerState.buildParams);
break;
default:
case 'aws':
cloud_runner_logger_1.default.log('Cloud Runner platform selected AWS');
cloud_runner_state_1.CloudRunnerState.CloudRunnerProviderPlatform = new aws_1.default(cloud_runner_state_1.CloudRunnerState.buildParams);
break;
}
}
static run(buildParameters, baseImage) {
return __awaiter(this, void 0, void 0, function* () {
CloudRunner.setup(buildParameters);
try {
core.startGroup('Setup remote runner');
yield cloud_runner_state_1.CloudRunnerState.CloudRunnerProviderPlatform.setupSharedResources(cloud_runner_state_1.CloudRunnerState.buildParams.buildGuid, cloud_runner_state_1.CloudRunnerState.buildParams, cloud_runner_state_1.CloudRunnerState.branchName, cloud_runner_state_1.CloudRunnerState.defaultSecrets);
core.endGroup();
const output = yield new workflow_composition_root_1.WorkflowCompositionRoot().run(new cloud_runner_step_state_1.CloudRunnerStepState(baseImage, task_parameter_serializer_1.TaskParameterSerializer.readBuildEnvironmentVariables(), cloud_runner_state_1.CloudRunnerState.defaultSecrets));
core.startGroup('Cleanup');
yield cloud_runner_state_1.CloudRunnerState.CloudRunnerProviderPlatform.cleanupSharedResources(cloud_runner_state_1.CloudRunnerState.buildParams.buildGuid, cloud_runner_state_1.CloudRunnerState.buildParams, cloud_runner_state_1.CloudRunnerState.branchName, cloud_runner_state_1.CloudRunnerState.defaultSecrets);
cloud_runner_logger_1.default.log(`Cleanup complete`);
core.endGroup();
return output;
}
catch (error) {
core.endGroup();
yield cloud_runner_error_1.CloudRunnerError.handleException(error);
throw error;
}
});
}
}
exports["default"] = CloudRunner;
/***/ }),
/***/ 91477:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.CloudRunnerError = void 0;
const cloud_runner_logger_1 = __importDefault(__nccwpck_require__(22855));
const cloud_runner_state_1 = __nccwpck_require__(70912);
const core = __importStar(__nccwpck_require__(42186));
class CloudRunnerError {
static handleException(error) {
return __awaiter(this, void 0, void 0, function* () {
cloud_runner_logger_1.default.error(JSON.stringify(error, undefined, 4));
core.setFailed('Cloud Runner failed');
yield cloud_runner_state_1.CloudRunnerState.CloudRunnerProviderPlatform.cleanupSharedResources(cloud_runner_state_1.CloudRunnerState.buildParams.buildGuid, cloud_runner_state_1.CloudRunnerState.buildParams, cloud_runner_state_1.CloudRunnerState.branchName, cloud_runner_state_1.CloudRunnerState.defaultSecrets);
});
}
}
exports.CloudRunnerError = CloudRunnerError;
/***/ }),
/***/ 25107:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
const k8s = __importStar(__nccwpck_require__(89679));
const __1 = __nccwpck_require__(41359);
const core = __importStar(__nccwpck_require__(42186));
const kubernetes_storage_1 = __importDefault(__nccwpck_require__(43951));
const kubernetes_task_runner_1 = __importDefault(__nccwpck_require__(7181));
const kubernetes_secret_1 = __importDefault(__nccwpck_require__(71586));
const async_wait_until_1 = __importDefault(__nccwpck_require__(41299));
const kubernetes_job_spec_factory_1 = __importDefault(__nccwpck_require__(1739));
const kubernetes_service_account_1 = __importDefault(__nccwpck_require__(42915));
const cloud_runner_logger_1 = __importDefault(__nccwpck_require__(22855));
class Kubernetes {
constructor(buildParameters) {
this.buildGuid = '';
this.pvcName = '';
this.secretName = '';
this.jobName = '';
this.podName = '';
this.containerName = '';
this.cleanupCronJobName = '';
this.serviceAccountName = '';
this.kubeConfig = new k8s.KubeConfig();
this.kubeConfig.loadFromDefault();
this.kubeClient = this.kubeConfig.makeApiClient(k8s.CoreV1Api);
this.kubeClientBatch = this.kubeConfig.makeApiClient(k8s.BatchV1Api);
cloud_runner_logger_1.default.log('Loaded default Kubernetes configuration for this environment');
this.namespace = 'default';
this.buildParameters = buildParameters;
}
setupSharedResources(buildGuid, buildParameters,
// eslint-disable-next-line no-unused-vars
branchName,
// eslint-disable-next-line no-unused-vars
defaultSecretsArray) {
return __awaiter(this, void 0, void 0, function* () {
try {
this.pvcName = `unity-builder-pvc-${buildGuid}`;
this.cleanupCronJobName = `unity-builder-cronjob-${buildGuid}`;
this.serviceAccountName = `service-account-${buildGuid}`;
yield kubernetes_storage_1.default.createPersistentVolumeClaim(buildParameters, this.pvcName, this.kubeClient, this.namespace);
yield kubernetes_service_account_1.default.createServiceAccount(this.serviceAccountName, this.namespace, this.kubeClient);
}
catch (error) {
throw error;
}
});
}
runTask(buildGuid, image, commands, mountdir, workingdir, environment, secrets) {
return __awaiter(this, void 0, void 0, function* () {
try {
// setup
this.buildGuid = buildGuid;
this.secretName = `build-credentials-${buildGuid}`;
this.jobName = `unity-builder-job-${buildGuid}`;
this.containerName = `main`;
yield kubernetes_secret_1.default.createSecret(secrets, this.secretName, this.namespace, this.kubeClient);
const jobSpec = kubernetes_job_spec_factory_1.default.getJobSpec(commands, image, mountdir, workingdir, environment, secrets, this.buildGuid, this.buildParameters, this.secretName, this.pvcName, this.jobName, k8s);
//run
const jobResult = yield this.kubeClientBatch.createNamespacedJob(this.namespace, jobSpec);
cloud_runner_logger_1.default.log(`Creating build job ${JSON.stringify(jobResult.body.metadata, undefined, 4)}`);
yield new Promise((promise) => setTimeout(promise, 5000));
cloud_runner_logger_1.default.log('Job created');
this.setPodNameAndContainerName(yield Kubernetes.findPodFromJob(this.kubeClient, this.jobName, this.namespace));
cloud_runner_logger_1.default.log('Watching pod until running');
let output = '';
// eslint-disable-next-line no-constant-condition
while (true) {
try {
yield kubernetes_task_runner_1.default.watchUntilPodRunning(this.kubeClient, this.podName, this.namespace);
cloud_runner_logger_1.default.log('Pod running, streaming logs');
output = yield kubernetes_task_runner_1.default.runTask(this.kubeConfig, this.kubeClient, this.jobName, this.podName, 'main', this.namespace, cloud_runner_logger_1.default.log);
break;
}
catch (error) {
if (error.message.includes(`HTTP`)) {
continue;
}
else {
throw error;
}
}
}
yield this.cleanupTaskResources();
return output;
}
catch (error) {
cloud_runner_logger_1.default.log('Running job failed');
core.error(JSON.stringify(error, undefined, 4));
yield this.cleanupTaskResources();
throw error;
}
});
}
setPodNameAndContainerName(pod) {
var _a, _b, _c;
this.podName = ((_a = pod.metadata) === null || _a === void 0 ? void 0 : _a.name) || '';
this.containerName = ((_c = (_b = pod.status) === null || _b === void 0 ? void 0 : _b.containerStatuses) === null || _c === void 0 ? void 0 : _c[0].name) || '';
}
cleanupTaskResources() {
return __awaiter(this, void 0, void 0, function* () {
cloud_runner_logger_1.default.log('cleaning up');
try {
yield this.kubeClientBatch.deleteNamespacedJob(this.jobName, this.namespace);
yield this.kubeClient.deleteNamespacedPod(this.podName, this.namespace);
yield this.kubeClient.deleteNamespacedSecret(this.secretName, this.namespace);
yield new Promise((promise) => setTimeout(promise, 5000));
}
catch (error) {
cloud_runner_logger_1.default.log('Failed to cleanup, error:');
core.error(JSON.stringify(error, undefined, 4));
cloud_runner_logger_1.default.log('Abandoning cleanup, build error:');
throw error;
}
try {
yield async_wait_until_1.default(() => __awaiter(this, void 0, void 0, function* () {
var _b;
const jobBody = (yield this.kubeClientBatch.readNamespacedJob(this.jobName, this.namespace)).body;
const podBody = (yield this.kubeClient.readNamespacedPod(this.podName, this.namespace)).body;
return (jobBody === null || ((_b = jobBody.status) === null || _b === void 0 ? void 0 : _b.active) === 0) && podBody === null;
}), {
timeout: 500000,
intervalBetweenAttempts: 15000,
});
// eslint-disable-next-line no-empty
}
catch (_a) { }
});
}
cleanupSharedResources(buildGuid, buildParameters,
// eslint-disable-next-line no-unused-vars
branchName,
// eslint-disable-next-line no-unused-vars
defaultSecretsArray) {
return __awaiter(this, void 0, void 0, function* () {
cloud_runner_logger_1.default.log(`deleting PVC`);
yield this.kubeClient.deleteNamespacedPersistentVolumeClaim(this.pvcName, this.namespace);
yield __1.Output.setBuildVersion(buildParameters.buildVersion);
// eslint-disable-next-line unicorn/no-process-exit
process.exit();
});
}
static findPodFromJob(kubeClient, jobName, namespace) {
return __awaiter(this, void 0, void 0, function* () {
const namespacedPods = yield kubeClient.listNamespacedPod(namespace);
const pod = namespacedPods.body.items.find((x) => { var _a, _b; return ((_b = (_a = x.metadata) === null || _a === void 0 ? void 0 : _a.labels) === null || _b === void 0 ? void 0 : _b['job-name']) === jobName; });
if (pod === undefined) {
throw new Error("pod with job-name label doesn't exist");
}
return pod;
});
}
}
exports["default"] = Kubernetes;
/***/ }),
/***/ 1739:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
const client_node_1 = __nccwpck_require__(89679);
const cloud_runner_build_command_process_1 = __nccwpck_require__(71899);
const cloud_runner_state_1 = __nccwpck_require__(70912);
class KubernetesJobSpecFactory {
static getJobSpec(command, image, mountdir, workingDirectory, environment, secrets, buildGuid, buildParameters, secretName, pvcName, jobName, k8s) {
environment.push(...[
{
name: 'GITHUB_SHA',
value: buildGuid,
},
{
name: 'GITHUB_WORKSPACE',
value: '/data/repo',
},
{
name: 'PROJECT_PATH',
value: buildParameters.projectPath,
},
{
name: 'BUILD_PATH',
value: buildParameters.buildPath,
},
{
name: 'BUILD_FILE',
value: buildParameters.buildFile,
},
{
name: 'BUILD_NAME',
value: buildParameters.buildName,
},
{
name: 'BUILD_METHOD',
value: buildParameters.buildMethod,
},
{
name: 'CUSTOM_PARAMETERS',
value: buildParameters.customParameters,
},
{
name: 'CHOWN_FILES_TO',
value: buildParameters.chownFilesTo,
},
{
name: 'BUILD_TARGET',
value: buildParameters.targetPlatform,
},
{
name: 'ANDROID_VERSION_CODE',
value: buildParameters.androidVersionCode.toString(),
},
{
name: 'ANDROID_KEYSTORE_NAME',
value: buildParameters.androidKeystoreName,
},
{
name: 'ANDROID_KEYALIAS_NAME',
value: buildParameters.androidKeyaliasName,
},
]);
const job = new k8s.V1Job();
job.apiVersion = 'batch/v1';
job.kind = 'Job';
job.metadata = {
name: jobName,
labels: {
app: 'unity-builder',
buildGuid,
},
};
job.spec = {
backoffLimit: 0,
template: {
spec: {
volumes: [
{
name: 'build-mount',
persistentVolumeClaim: {
claimName: pvcName,
},
},
],
containers: [
{
name: 'main',
image,
command: ['/bin/sh'],
args: ['-c', cloud_runner_build_command_process_1.CloudRunnerBuildCommandProcessor.ProcessCommands(command, cloud_runner_state_1.CloudRunnerState.buildParams)],
workingDir: `${workingDirectory}`,
resources: {
requests: {
memory: buildParameters.cloudRunnerMemory,
cpu: buildParameters.cloudRunnerCpu,
},
},
env: [
...environment.map((x) => {
const environmentVariable = new client_node_1.V1EnvVar();
environmentVariable.name = x.name;
environmentVariable.value = x.value;
return environmentVariable;
}),
...secrets.map((x) => {
const secret = new client_node_1.V1EnvVarSource();
secret.secretKeyRef = new client_node_1.V1SecretKeySelector();
secret.secretKeyRef.key = x.ParameterKey;
secret.secretKeyRef.name = secretName;
const environmentVariable = new client_node_1.V1EnvVar();
environmentVariable.name = x.EnvironmentVariable;
environmentVariable.valueFrom = secret;
return environmentVariable;
}),
],
volumeMounts: [
{
name: 'build-mount',
mountPath: `/${mountdir}`,
},
],
lifecycle: {
preStop: {
exec: {
command: [
'bin/bash',
'-c',
`cd /data/builder/action/steps;
chmod +x /return_license.sh;
/return_license.sh;`,
],
},
},
},
},
],
restartPolicy: 'Never',
},
},
};
return job;
}
}
exports["default"] = KubernetesJobSpecFactory;
/***/ }),
/***/ 71586:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
const k8s = __importStar(__nccwpck_require__(89679));
const base64 = __nccwpck_require__(85848);
class KubernetesSecret {
static createSecret(secrets, secretName, namespace, kubeClient) {
return __awaiter(this, void 0, void 0, function* () {
const secret = new k8s.V1Secret();
secret.apiVersion = 'v1';
secret.kind = 'Secret';
secret.type = 'Opaque';
secret.metadata = {
name: secretName,
};
secret.data = {};
for (const buildSecret of secrets) {
secret.data[buildSecret.ParameterKey] = base64.encode(buildSecret.ParameterValue);
}
return kubeClient.createNamespacedSecret(namespace, secret);
});
}
}
exports["default"] = KubernetesSecret;
/***/ }),
/***/ 42915:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
const k8s = __importStar(__nccwpck_require__(89679));
class KubernetesServiceAccount {
static createServiceAccount(serviceAccountName, namespace, kubeClient) {
return __awaiter(this, void 0, void 0, function* () {
const serviceAccount = new k8s.V1ServiceAccount();
serviceAccount.apiVersion = 'v1';
serviceAccount.kind = 'ServiceAccount';
serviceAccount.metadata = {
name: serviceAccountName,
};
serviceAccount.automountServiceAccountToken = false;
return kubeClient.createNamespacedServiceAccount(namespace, serviceAccount);
});
}
}
exports["default"] = KubernetesServiceAccount;
/***/ }),
/***/ 43951:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
const async_wait_until_1 = __importDefault(__nccwpck_require__(41299));
const core = __importStar(__nccwpck_require__(42186));
const k8s = __importStar(__nccwpck_require__(89679));
const cloud_runner_logger_1 = __importDefault(__nccwpck_require__(22855));
const yaml_1 = __importDefault(__nccwpck_require__(44603));
class KubernetesStorage {
static createPersistentVolumeClaim(buildParameters, pvcName, kubeClient, namespace) {
return __awaiter(this, void 0, void 0, function* () {
if (buildParameters.kubeVolume) {
cloud_runner_logger_1.default.log(buildParameters.kubeVolume);
pvcName = buildParameters.kubeVolume;
return;
}
const pvcList = (yield kubeClient.listNamespacedPersistentVolumeClaim(namespace)).body.items.map((x) => { var _a; return (_a = x.metadata) === null || _a === void 0 ? void 0 : _a.name; });
cloud_runner_logger_1.default.log(`Current PVCs in namespace ${namespace}`);
cloud_runner_logger_1.default.log(JSON.stringify(pvcList, undefined, 4));
if (pvcList.includes(pvcName)) {
cloud_runner_logger_1.default.log(`pvc ${pvcName} already exists`);
core.setOutput('volume', pvcName);
return;
}
cloud_runner_logger_1.default.log(`Creating PVC ${pvcName} (does not exist)`);
const result = yield KubernetesStorage.createPVC(pvcName, buildParameters, kubeClient, namespace);
yield KubernetesStorage.handleResult(result, kubeClient, namespace, pvcName);
});
}
static getPVCPhase(kubeClient, name, namespace) {
var _a;
return __awaiter(this, void 0, void 0, function* () {
try {
return (_a = (yield kubeClient.readNamespacedPersistentVolumeClaim(name, namespace)).body.status) === null || _a === void 0 ? void 0 : _a.phase;
}
catch (error) {
core.error('Failed to get PVC phase');
core.error(JSON.stringify(error, undefined, 4));
throw error;
}
});
}
static watchUntilPVCNotPending(kubeClient, name, namespace) {
return __awaiter(this, void 0, void 0, function* () {
try {
cloud_runner_logger_1.default.log(`watch Until PVC Not Pending ${name} ${namespace}`);
cloud_runner_logger_1.default.log(`${yield this.getPVCPhase(kubeClient, name, namespace)}`);
yield async_wait_until_1.default(() => __awaiter(this, void 0, void 0, function* () {
return (yield this.getPVCPhase(kubeClient, name, namespace)) !== 'Pending';
}), {
timeout: 500000,
intervalBetweenAttempts: 15000,
});
}
catch (error) {
core.error('Failed to watch PVC');
core.error(error.toString());
core.error(`PVC Body: ${JSON.stringify((yield kubeClient.readNamespacedPersistentVolumeClaim(name, namespace)).body, undefined, 4)}`);
throw error;
}
});
}
static createPVC(pvcName, buildParameters, kubeClient, namespace) {
return __awaiter(this, void 0, void 0, function* () {
const pvc = new k8s.V1PersistentVolumeClaim();
pvc.apiVersion = 'v1';
pvc.kind = 'PersistentVolumeClaim';
pvc.metadata = {
name: pvcName,
};
pvc.spec = {
accessModes: ['ReadWriteOnce'],
storageClassName: process.env.K8s_STORAGE_CLASS || 'standard',
resources: {
requests: {
storage: buildParameters.kubeVolumeSize,
},
},
};
if (process.env.K8s_STORAGE_PVC_SPEC) {
yaml_1.default.parse(process.env.K8s_STORAGE_PVC_SPEC);
}
const result = yield kubeClient.createNamespacedPersistentVolumeClaim(namespace, pvc);
return result;
});
}
static handleResult(result, kubeClient, namespace, pvcName) {
var _a;
return __awaiter(this, void 0, void 0, function* () {
const name = ((_a = result.body.metadata) === null || _a === void 0 ? void 0 : _a.name) || '';
cloud_runner_logger_1.default.log(`PVC ${name} created`);
yield this.watchUntilPVCNotPending(kubeClient, name, namespace);
cloud_runner_logger_1.default.log(`PVC ${name} is ready and not pending`);
core.setOutput('volume', pvcName);
});
}
}
exports["default"] = KubernetesStorage;
/***/ }),
/***/ 7181:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
const client_node_1 = __nccwpck_require__(89679);
const stream_1 = __nccwpck_require__(12781);
const cloud_runner_logger_1 = __importDefault(__nccwpck_require__(22855));
const core = __importStar(__nccwpck_require__(42186));
const cloud_runner_statics_1 = __nccwpck_require__(90828);
const async_wait_until_1 = __importDefault(__nccwpck_require__(41299));
const __1 = __nccwpck_require__(41359);
class KubernetesTaskRunner {
static runTask(kubeConfig, kubeClient, jobName, podName, containerName, namespace, logCallback) {
return __awaiter(this, void 0, void 0, function* () {
cloud_runner_logger_1.default.log(`Streaming logs from pod: ${podName} container: ${containerName} namespace: ${namespace}`);
const stream = new stream_1.Writable();
let output = '';
let didStreamAnyLogs = false;
stream._write = (chunk, encoding, next) => {
didStreamAnyLogs = true;
let message = chunk.toString().trimRight(`\n`);
message = `[${cloud_runner_statics_1.CloudRunnerStatics.logPrefix}] ${message}`;
if (__1.Input.cloudRunnerTests) {
output += message;
}
logCallback(message);
next();
};
const logOptions = {
follow: true,
pretty: false,
previous: false,
};
try {
const resultError = yield new Promise((resolve) => new client_node_1.Log(kubeConfig).log(namespace, podName, containerName, stream, resolve, logOptions));
stream.destroy();
if (resultError) {
throw resultError;
}
if (!didStreamAnyLogs) {
core.error('Failed to stream any logs, listing namespace events, check for an error with the container');
core.error(JSON.stringify({
events: (yield kubeClient.listNamespacedEvent(namespace)).body.items
.filter((x) => {
return x.involvedObject.name === podName || x.involvedObject.name === jobName;
})
.map((x) => {
return {
type: x.involvedObject.kind,
name: x.involvedObject.name,
message: x.message,
};
}),
}, undefined, 4));
throw new Error(`No logs streamed from k8s`);
}
}
catch (error) {
if (stream) {
stream.destroy();
}
throw error;
}
cloud_runner_logger_1.default.log('end of log stream');
return output;
});
}
static watchUntilPodRunning(kubeClient, podName, namespace) {
return __awaiter(this, void 0, void 0, function* () {
let success = false;
cloud_runner_logger_1.default.log(`Watching ${podName} ${namespace}`);
yield async_wait_until_1.default(() => __awaiter(this, void 0, void 0, function* () {
var _a, _b, _c, _d, _e, _f;
const status = yield kubeClient.readNamespacedPodStatus(podName, namespace);
const phase = (_a = status === null || status === void 0 ? void 0 : status.body.status) === null || _a === void 0 ? void 0 : _a.phase;
success = phase === 'Running';
cloud_runner_logger_1.default.log(`${(_b = status.body.status) === null || _b === void 0 ? void 0 : _b.phase} ${((_d = (_c = status.body.status) === null || _c === void 0 ? void 0 : _c.conditions) === null || _d === void 0 ? void 0 : _d[0].reason) || ''} ${((_f = (_e = status.body.status) === null || _e === void 0 ? void 0 : _e.conditions) === null || _f === void 0 ? void 0 : _f[0].message) || ''}`);
if (success || phase !== 'Pending')
return true;
return false;
}), {
timeout: 2000000,
intervalBetweenAttempts: 15000,
});
return success;
});
}
}
exports["default"] = KubernetesTaskRunner;
/***/ }),
/***/ 71899:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.Hook = exports.CloudRunnerBuildCommandProcessor = void 0;
const __1 = __nccwpck_require__(41359);
const yaml_1 = __importDefault(__nccwpck_require__(44603));
class CloudRunnerBuildCommandProcessor {
static ProcessCommands(commands, buildParameters) {
const hooks = CloudRunnerBuildCommandProcessor.getHooks().filter((x) => x.step.includes(`all`));
return `echo "---"
echo "start cloud runner init"
${__1.Input.cloudRunnerTests ? '' : '#'} printenv
echo "start cloud runner job"
${hooks.filter((x) => x.hook.includes(`before`)).map((x) => x.commands) || ' '}
${commands}
${hooks.filter((x) => x.hook.includes(`after`)).map((x) => x.commands) || ' '}
echo "end of cloud runner job
---${buildParameters.logId}"
`;
}
static getHooks() {
const experimentHooks = process.env.EXPERIMENTAL_HOOKS;
let output = new Array();
if (experimentHooks && experimentHooks !== '') {
try {
output = yaml_1.default.parse(experimentHooks);
}
catch (error) {
throw error;
}
}
return output.filter((x) => x.step !== undefined && x.hook !== undefined && x.hook.length > 0);
}
}
exports.CloudRunnerBuildCommandProcessor = CloudRunnerBuildCommandProcessor;
class Hook {
constructor() {
this.secrets = new Array();
}
}
exports.Hook = Hook;
/***/ }),
/***/ 91311:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
class CloudRunnerConstants {
}
CloudRunnerConstants.alphabet = '0123456789abcdefghijklmnopqrstuvwxyz';
exports["default"] = CloudRunnerConstants;
/***/ }),
/***/ 22855:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
const core = __importStar(__nccwpck_require__(42186));
class CloudRunnerLogger {
static setup() {
this.timestamp = this.createTimestamp();
this.globalTimestamp = this.timestamp;
}
static log(message) {
core.info(message);
}
static logWarning(message) {
core.warning(message);
}
static logLine(message) {
core.info(`${message}\n`);
}
static error(message) {
core.error(message);
}
static logWithTime(message) {
const newTimestamp = this.createTimestamp();
core.info(`${message} (Since previous: ${this.calculateTimeDiff(newTimestamp, this.timestamp)}, Total time: ${this.calculateTimeDiff(newTimestamp, this.globalTimestamp)})`);
this.timestamp = newTimestamp;
}
static calculateTimeDiff(x, y) {
return Math.floor((x - y) / 1000);
}
static createTimestamp() {
return Date.now();
}
}
exports["default"] = CloudRunnerLogger;
/***/ }),
/***/ 63287:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
const nanoid_1 = __nccwpck_require__(17592);
const cloud_runner_constants_1 = __importDefault(__nccwpck_require__(91311));
class CloudRunnerNamespace {
static generateBuildName(runNumber, platform) {
const nanoid = nanoid_1.customAlphabet(cloud_runner_constants_1.default.alphabet, 4);
return `${runNumber}-${platform.toLowerCase().replace('standalone', '')}-${nanoid()}`;
}
}
exports["default"] = CloudRunnerNamespace;
/***/ }),
/***/ 35346:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.TaskParameterSerializer = void 0;
const __1 = __nccwpck_require__(41359);
const image_environment_factory_1 = __importDefault(__nccwpck_require__(25145));
const cloud_runner_state_1 = __nccwpck_require__(70912);
const cloud_runner_build_command_process_1 = __nccwpck_require__(71899);
class TaskParameterSerializer {
static readBuildEnvironmentVariables() {
TaskParameterSerializer.setupDefaultSecrets();
return [
{
name: 'ContainerMemory',
value: cloud_runner_state_1.CloudRunnerState.buildParams.cloudRunnerMemory,
},
{
name: 'ContainerCpu',
value: cloud_runner_state_1.CloudRunnerState.buildParams.cloudRunnerCpu,
},
{
name: 'BUILD_TARGET',
value: cloud_runner_state_1.CloudRunnerState.buildParams.targetPlatform,
},
...TaskParameterSerializer.serializeBuildParamsAndInput,
];
}
static get serializeBuildParamsAndInput() {
let array = new Array();
array = TaskParameterSerializer.readBuildParameters(array);
array = TaskParameterSerializer.readInput(array);
const configurableHooks = cloud_runner_build_command_process_1.CloudRunnerBuildCommandProcessor.getHooks();
const secrets = configurableHooks.map((x) => x.secrets).filter((x) => x !== undefined && x.length > 0);
if (secrets.length > 0) {
// eslint-disable-next-line unicorn/no-array-reduce
array.push(secrets.reduce((x, y) => [...x, ...y]));
}
array = array.filter((x) => x.value !== undefined && x.name !== '0' && x.value !== '' && x.name !== 'prototype' && x.name !== 'length');
array = array.map((x) => {
x.name = __1.Input.ToEnvVarFormat(x.name);
x.value = `${x.value}`;
return x;
});
return array;
}
static readBuildParameters(array) {
const keys = Object.keys(cloud_runner_state_1.CloudRunnerState.buildParams);
for (const element of keys) {
array.push({
name: element,
value: cloud_runner_state_1.CloudRunnerState.buildParams[element],
});
}
array.push({ name: 'buildParameters', value: JSON.stringify(cloud_runner_state_1.CloudRunnerState.buildParams) });
return array;
}
static readInput(array) {
const input = Object.getOwnPropertyNames(__1.Input);
for (const element of input) {
if (typeof __1.Input[element] !== 'function' && array.filter((x) => x.name === element).length === 0) {
array.push({
name: element,
value: `${__1.Input[element]}`,
});
}
}
return array;
}
static setupDefaultSecrets() {
if (cloud_runner_state_1.CloudRunnerState.defaultSecrets === undefined)
cloud_runner_state_1.CloudRunnerState.defaultSecrets = image_environment_factory_1.default.getEnvironmentVariables(cloud_runner_state_1.CloudRunnerState.buildParams).map((x) => {
return {
ParameterKey: x.name,
EnvironmentVariable: x.name,
ParameterValue: x.value,
};
});
}
}
exports.TaskParameterSerializer = TaskParameterSerializer;
/***/ }),
/***/ 70912:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.CloudRunnerState = void 0;
const path_1 = __importDefault(__nccwpck_require__(71017));
class CloudRunnerState {
// only the following paths that do not start a path.join with another "Full" suffixed property need to start with an absolute /
static get buildPathFull() {
return path_1.default.join(`/`, CloudRunnerState.buildVolumeFolder, CloudRunnerState.buildParams.buildGuid);
}
static get cacheFolderFull() {
return path_1.default.join('/', CloudRunnerState.buildVolumeFolder, CloudRunnerState.cacheFolder, CloudRunnerState.branchName);
}
static setup(buildParameters) {
CloudRunnerState.buildParams = buildParameters;
}
static get branchName() {
return CloudRunnerState.buildParams.branch;
}
static get builderPathFull() {
return path_1.default.join(CloudRunnerState.buildPathFull, `builder`);
}
static get repoPathFull() {
return path_1.default.join(CloudRunnerState.buildPathFull, CloudRunnerState.repositoryFolder);
}
static get projectPathFull() {
return path_1.default.join(CloudRunnerState.repoPathFull, CloudRunnerState.buildParams.projectPath);
}
static get libraryFolderFull() {
return path_1.default.join(CloudRunnerState.projectPathFull, `Library`);
}
static get lfsDirectoryFull() {
return path_1.default.join(CloudRunnerState.repoPathFull, `.git`, `lfs`);
}
static get purgeRemoteCaching() {
return process.env.PURGE_REMOTE_BUILDER_CACHE !== undefined;
}
static get lfsCacheFolderFull() {
return path_1.default.join(CloudRunnerState.cacheFolderFull, `lfs`);
}
static get libraryCacheFolderFull() {
return path_1.default.join(CloudRunnerState.cacheFolderFull, `Library`);
}
static get unityBuilderRepoUrl() {
return `https://${CloudRunnerState.buildParams.githubToken}@github.com/game-ci/unity-builder.git`;
}
static get targetBuildRepoUrl() {
return `https://${CloudRunnerState.buildParams.githubToken}@github.com/${CloudRunnerState.buildParams.githubRepo}.git`;
}
static get buildVolumeFolder() {
return 'data';
}
static get cacheFolder() {
return 'cache';
}
}
exports.CloudRunnerState = CloudRunnerState;
CloudRunnerState.repositoryFolder = 'repo';
/***/ }),
/***/ 64854:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.CloudRunnerStepState = void 0;
class CloudRunnerStepState {
constructor(image, environmentVariables, secrets) {
this.image = image;
this.environment = environmentVariables;
this.secrets = secrets;
}
}
exports.CloudRunnerStepState = CloudRunnerStepState;
/***/ }),
/***/ 91491:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.BuildStep = void 0;
const path_1 = __importDefault(__nccwpck_require__(71017));
const __1 = __nccwpck_require__(41359);
const cloud_runner_build_command_process_1 = __nccwpck_require__(71899);
const cloud_runner_logger_1 = __importDefault(__nccwpck_require__(22855));
const cloud_runner_state_1 = __nccwpck_require__(70912);
class BuildStep {
run(cloudRunnerStepState) {
return __awaiter(this, void 0, void 0, function* () {
return yield BuildStep.BuildStep(cloudRunnerStepState.image, cloudRunnerStepState.environment, cloudRunnerStepState.secrets);
});
}
static BuildStep(image, environmentVariables, secrets) {
return __awaiter(this, void 0, void 0, function* () {
cloud_runner_logger_1.default.logLine(` `);
cloud_runner_logger_1.default.logLine('Starting part 2/2 (build unity project)');
const hooks = cloud_runner_build_command_process_1.CloudRunnerBuildCommandProcessor.getHooks().filter((x) => x.step.includes(`setup`));
return yield cloud_runner_state_1.CloudRunnerState.CloudRunnerProviderPlatform.runTask(cloud_runner_state_1.CloudRunnerState.buildParams.buildGuid, image, `${hooks.filter((x) => x.hook.includes(`before`)).map((x) => x.commands) || ' '}
export GITHUB_WORKSPACE="${cloud_runner_state_1.CloudRunnerState.repoPathFull}"
cp -r "${path_1.default
.join(cloud_runner_state_1.CloudRunnerState.builderPathFull, 'dist', 'default-build-script')
.replace(/\\/g, `/`)}" "/UnityBuilderAction"
cp -r "${path_1.default
.join(cloud_runner_state_1.CloudRunnerState.builderPathFull, 'dist', 'platforms', 'ubuntu', 'entrypoint.sh')
.replace(/\\/g, `/`)}" "/entrypoint.sh"
cp -r "${path_1.default
.join(cloud_runner_state_1.CloudRunnerState.builderPathFull, 'dist', 'platforms', 'ubuntu', 'steps')
.replace(/\\/g, `/`)}" "/steps"
chmod -R +x "/entrypoint.sh"
chmod -R +x "/steps"
/entrypoint.sh
apt-get update
apt-get install -y -q zip tree
cd "${cloud_runner_state_1.CloudRunnerState.libraryFolderFull.replace(/\\/g, `/`)}/.."
zip -r "lib-${cloud_runner_state_1.CloudRunnerState.buildParams.buildGuid}.zip" "Library"
mv "lib-${cloud_runner_state_1.CloudRunnerState.buildParams.buildGuid}.zip" "${cloud_runner_state_1.CloudRunnerState.cacheFolderFull.replace(/\\/g, `/`)}/Library"
cd "${cloud_runner_state_1.CloudRunnerState.repoPathFull.replace(/\\/g, `/`)}"
${__1.Input.cloudRunnerTests ? '' : '#'} tree -lh
zip -r "build-${cloud_runner_state_1.CloudRunnerState.buildParams.buildGuid}.zip" "build"
${__1.Input.cloudRunnerTests ? '' : '#'} tree -lh
${__1.Input.cloudRunnerTests ? '' : '#'} tree -lh "${cloud_runner_state_1.CloudRunnerState.cacheFolderFull.replace(/\\/g, `/`)}"
mv "build-${cloud_runner_state_1.CloudRunnerState.buildParams.buildGuid}.zip" "${cloud_runner_state_1.CloudRunnerState.cacheFolderFull.replace(/\\/g, `/`)}"
chmod +x ${path_1.default.join(cloud_runner_state_1.CloudRunnerState.builderPathFull, 'dist', `index.js`).replace(/\\/g, `/`)}
node ${path_1.default
.join(cloud_runner_state_1.CloudRunnerState.builderPathFull, 'dist', `index.js`)
.replace(/\\/g, `/`)} -m cache-push "Library" "lib-${cloud_runner_state_1.CloudRunnerState.buildParams.buildGuid}.zip" "${cloud_runner_state_1.CloudRunnerState.cacheFolderFull.replace(/\\/g, `/`)}/Library"
${__1.Input.cloudRunnerTests ? '' : '#'} tree -lh "${cloud_runner_state_1.CloudRunnerState.cacheFolderFull}"
${hooks.filter((x) => x.hook.includes(`after`)).map((x) => x.commands) || ' '}
`, `/${cloud_runner_state_1.CloudRunnerState.buildVolumeFolder}`, `/${cloud_runner_state_1.CloudRunnerState.projectPathFull}`, environmentVariables, secrets);
});
}
}
exports.BuildStep = BuildStep;
/***/ }),
/***/ 58923:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.SetupStep = void 0;
const path_1 = __importDefault(__nccwpck_require__(71017));
const __1 = __nccwpck_require__(41359);
const cloud_runner_build_command_process_1 = __nccwpck_require__(71899);
const cloud_runner_logger_1 = __importDefault(__nccwpck_require__(22855));
const cloud_runner_state_1 = __nccwpck_require__(70912);
class SetupStep {
run(cloudRunnerStepState) {
return __awaiter(this, void 0, void 0, function* () {
try {
return yield SetupStep.downloadRepository(cloudRunnerStepState.image, cloudRunnerStepState.environment, cloudRunnerStepState.secrets);
}
catch (error) {
throw error;
}
});
}
static getCloudRunnerBranch() {
var _a;
return ((_a = process.env.CLOUD_RUNNER_BRANCH) === null || _a === void 0 ? void 0 : _a.includes('/')) ? process.env.CLOUD_RUNNER_BRANCH.split('/').reverse()[0]
: process.env.CLOUD_RUNNER_BRANCH;
}
static downloadRepository(image, environmentVariables, secrets) {
return __awaiter(this, void 0, void 0, function* () {
try {
cloud_runner_logger_1.default.log(` `);
cloud_runner_logger_1.default.logLine('Starting step 1/2 (setup game files from repository)');
const hooks = cloud_runner_build_command_process_1.CloudRunnerBuildCommandProcessor.getHooks().filter((x) => x.step.includes(`setup`));
return yield cloud_runner_state_1.CloudRunnerState.CloudRunnerProviderPlatform.runTask(cloud_runner_state_1.CloudRunnerState.buildParams.buildGuid, image, `apk update -q
apk add git-lfs jq tree zip unzip nodejs -q
${hooks.filter((x) => x.hook.includes(`before`)).map((x) => x.commands) || ' '}
export GIT_DISCOVERY_ACROSS_FILESYSTEM=1
mkdir -p ${cloud_runner_state_1.CloudRunnerState.builderPathFull.replace(/\\/g, `/`)}
git clone -q -b ${SetupStep.getCloudRunnerBranch()} ${cloud_runner_state_1.CloudRunnerState.unityBuilderRepoUrl} "${cloud_runner_state_1.CloudRunnerState.builderPathFull.replace(/\\/g, `/`)}"
${__1.Input.cloudRunnerTests ? '' : '#'} tree ${cloud_runner_state_1.CloudRunnerState.builderPathFull.replace(/\\/g, `/`)}
chmod +x ${path_1.default.join(cloud_runner_state_1.CloudRunnerState.builderPathFull, 'dist', `index.js`).replace(/\\/g, `/`)}
node ${path_1.default.join(cloud_runner_state_1.CloudRunnerState.builderPathFull, 'dist', `index.js`).replace(/\\/g, `/`)} -m remote-cli
${hooks.filter((x) => x.hook.includes(`after`)).map((x) => x.commands) || ' '}
`, `/${cloud_runner_state_1.CloudRunnerState.buildVolumeFolder}`, `/${cloud_runner_state_1.CloudRunnerState.buildVolumeFolder}/`, environmentVariables, secrets);
}
catch (error) {
cloud_runner_logger_1.default.logLine(`Failed download repository step 1/2`);
throw error;
}
});
}
}
exports.SetupStep = SetupStep;
/***/ }),
/***/ 94655:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.BuildAutomationWorkflow = void 0;
const cloud_runner_logger_1 = __importDefault(__nccwpck_require__(22855));
const task_parameter_serializer_1 = __nccwpck_require__(35346);
const cloud_runner_state_1 = __nccwpck_require__(70912);
const cloud_runner_step_state_1 = __nccwpck_require__(64854);
const build_step_1 = __nccwpck_require__(91491);
const setup_step_1 = __nccwpck_require__(58923);
const custom_workflow_1 = __nccwpck_require__(3786);
const core = __importStar(__nccwpck_require__(42186));
class BuildAutomationWorkflow {
run(cloudRunnerStepState) {
return __awaiter(this, void 0, void 0, function* () {
try {
return yield BuildAutomationWorkflow.standardBuildAutomation(cloudRunnerStepState.image);
}
catch (error) {
throw error;
}
});
}
static standardBuildAutomation(baseImage) {
return __awaiter(this, void 0, void 0, function* () {
try {
cloud_runner_logger_1.default.log(`Cloud Runner is running standard build automation`);
core.startGroup('pre build steps');
let output = '';
if (cloud_runner_state_1.CloudRunnerState.buildParams.preBuildSteps !== '') {
output += yield custom_workflow_1.CustomWorkflow.runCustomJob(cloud_runner_state_1.CloudRunnerState.buildParams.preBuildSteps);
}
core.endGroup();
cloud_runner_logger_1.default.logWithTime('Configurable pre build step(s) time');
core.startGroup('setup');
output += yield new setup_step_1.SetupStep().run(new cloud_runner_step_state_1.CloudRunnerStepState('alpine/git', task_parameter_serializer_1.TaskParameterSerializer.readBuildEnvironmentVariables(), cloud_runner_state_1.CloudRunnerState.defaultSecrets));
core.endGroup();
cloud_runner_logger_1.default.logWithTime('Download repository step time');
core.startGroup('build');
output += yield new build_step_1.BuildStep().run(new cloud_runner_step_state_1.CloudRunnerStepState(baseImage, task_parameter_serializer_1.TaskParameterSerializer.readBuildEnvironmentVariables(), cloud_runner_state_1.CloudRunnerState.defaultSecrets));
core.endGroup();
cloud_runner_logger_1.default.logWithTime('Build time');
core.startGroup('post build steps');
if (cloud_runner_state_1.CloudRunnerState.buildParams.postBuildSteps !== '') {
output += yield custom_workflow_1.CustomWorkflow.runCustomJob(cloud_runner_state_1.CloudRunnerState.buildParams.postBuildSteps);
}
core.endGroup();
cloud_runner_logger_1.default.logWithTime('Configurable post build step(s) time');
cloud_runner_logger_1.default.log(`Cloud Runner finished running standard build automation`);
return output;
}
catch (error) {
throw error;
}
});
}
}
exports.BuildAutomationWorkflow = BuildAutomationWorkflow;
/***/ }),
/***/ 3786:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.CustomWorkflow = void 0;
const cloud_runner_logger_1 = __importDefault(__nccwpck_require__(22855));
const cloud_runner_state_1 = __nccwpck_require__(70912);
const yaml_1 = __importDefault(__nccwpck_require__(44603));
const __1 = __nccwpck_require__(41359);
const task_parameter_serializer_1 = __nccwpck_require__(35346);
class CustomWorkflow {
static runCustomJob(buildSteps) {
return __awaiter(this, void 0, void 0, function* () {
try {
cloud_runner_logger_1.default.log(`Cloud Runner is running in custom job mode`);
if (__1.Input.cloudRunnerTests) {
cloud_runner_logger_1.default.log(`Parsing build steps: ${buildSteps}`);
}
try {
buildSteps = yaml_1.default.parse(buildSteps);
let output = '';
for (const step of buildSteps) {
const stepSecrets = step.secrets.map((x) => {
const secret = {
ParameterKey: x.name,
EnvironmentVariable: __1.Input.ToEnvVarFormat(x.name),
ParameterValue: x.value,
};
return secret;
});
output += yield cloud_runner_state_1.CloudRunnerState.CloudRunnerProviderPlatform.runTask(cloud_runner_state_1.CloudRunnerState.buildParams.buildGuid, step['image'], step['commands'], `/${cloud_runner_state_1.CloudRunnerState.buildVolumeFolder}`, `/${cloud_runner_state_1.CloudRunnerState.buildVolumeFolder}/`, task_parameter_serializer_1.TaskParameterSerializer.readBuildEnvironmentVariables(), [...cloud_runner_state_1.CloudRunnerState.defaultSecrets, ...stepSecrets]);
}
return output;
}
catch (error) {
cloud_runner_logger_1.default.log(`failed to parse a custom job "${buildSteps}"`);
throw error;
}
}
catch (error) {
throw error;
}
});
}
}
exports.CustomWorkflow = CustomWorkflow;
/***/ }),
/***/ 54204:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.WorkflowCompositionRoot = void 0;
const cloud_runner_state_1 = __nccwpck_require__(70912);
const cloud_runner_step_state_1 = __nccwpck_require__(64854);
const custom_workflow_1 = __nccwpck_require__(3786);
const build_automation_workflow_1 = __nccwpck_require__(94655);
const task_parameter_serializer_1 = __nccwpck_require__(35346);
const setup_step_1 = __nccwpck_require__(58923);
class WorkflowCompositionRoot {
run(cloudRunnerStepState) {
return __awaiter(this, void 0, void 0, function* () {
try {
return yield WorkflowCompositionRoot.runJob(cloudRunnerStepState.image.toString());
}
catch (error) {
throw error;
}
});
}
static runJob(baseImage) {
return __awaiter(this, void 0, void 0, function* () {
try {
if (cloud_runner_state_1.CloudRunnerState.buildParams.customJob === `setup`) {
return yield new setup_step_1.SetupStep().run(new cloud_runner_step_state_1.CloudRunnerStepState(baseImage, task_parameter_serializer_1.TaskParameterSerializer.readBuildEnvironmentVariables(), cloud_runner_state_1.CloudRunnerState.defaultSecrets));
}
else if (cloud_runner_state_1.CloudRunnerState.buildParams.customJob !== '') {
return yield custom_workflow_1.CustomWorkflow.runCustomJob(cloud_runner_state_1.CloudRunnerState.buildParams.customJob);
}
return yield new build_automation_workflow_1.BuildAutomationWorkflow().run(new cloud_runner_step_state_1.CloudRunnerStepState(baseImage, task_parameter_serializer_1.TaskParameterSerializer.readBuildEnvironmentVariables(), cloud_runner_state_1.CloudRunnerState.defaultSecrets));
}
catch (error) {
throw error;
}
});
}
}
exports.WorkflowCompositionRoot = WorkflowCompositionRoot;
/***/ }),
/***/ 16934:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
const exec_1 = __nccwpck_require__(71514);
const image_environment_factory_1 = __importDefault(__nccwpck_require__(25145));
const fs_1 = __nccwpck_require__(57147);
const path_1 = __importDefault(__nccwpck_require__(71017));
class Docker {
static run(image, parameters, silent = false) {
return __awaiter(this, void 0, void 0, function* () {
let runCommand = '';
switch (process.platform) {
case 'linux':
runCommand = this.getLinuxCommand(image, parameters);
break;
case 'win32':
runCommand = this.getWindowsCommand(image, parameters);
}
yield exec_1.exec(runCommand, undefined, { silent });
});
}
static getLinuxCommand(image, parameters) {
const { workspace, actionFolder, runnerTempPath, sshAgent } = parameters;
const githubHome = path_1.default.join(runnerTempPath, '_github_home');
if (!fs_1.existsSync(githubHome))
fs_1.mkdirSync(githubHome);
const githubWorkflow = path_1.default.join(runnerTempPath, '_github_workflow');
if (!fs_1.existsSync(githubWorkflow))
fs_1.mkdirSync(githubWorkflow);
return `docker run \
--workdir /github/workspace \
--rm \
${image_environment_factory_1.default.getEnvVarString(parameters)} \
--env UNITY_SERIAL \
--env GITHUB_WORKSPACE=/github/workspace \
${sshAgent ? '--env SSH_AUTH_SOCK=/ssh-agent' : ''} \
--volume "${githubHome}":"/root:z" \
--volume "${githubWorkflow}":"/github/workflow:z" \
--volume "${workspace}":"/github/workspace:z" \
--volume "${actionFolder}/default-build-script:/UnityBuilderAction:z" \
--volume "${actionFolder}/platforms/ubuntu/steps:/steps:z" \
--volume "${actionFolder}/platforms/ubuntu/entrypoint.sh:/entrypoint.sh:z" \
${sshAgent ? `--volume ${sshAgent}:/ssh-agent` : ''} \
${sshAgent ? '--volume /home/runner/.ssh/known_hosts:/root/.ssh/known_hosts:ro' : ''} \
${image} \
/bin/bash -c /entrypoint.sh`;
}
static getWindowsCommand(image, parameters) {
const { workspace, actionFolder, unitySerial } = parameters;
return `docker run \
--workdir /github/workspace \
--rm \
${image_environment_factory_1.default.getEnvVarString(parameters)} \
--env UNITY_SERIAL="${unitySerial}" \
--env GITHUB_WORKSPACE=c:/github/workspace \
--volume "${workspace}":"c:/github/workspace" \
--volume "c:/regkeys":"c:/regkeys" \
--volume "C:/Program Files (x86)/Microsoft Visual Studio":"C:/Program Files (x86)/Microsoft Visual Studio" \
--volume "C:/Program Files (x86)/Windows Kits":"C:/Program Files (x86)/Windows Kits" \
--volume "C:/ProgramData/Microsoft/VisualStudio":"C:/ProgramData/Microsoft/VisualStudio" \
--volume "${actionFolder}/default-build-script":"c:/UnityBuilderAction" \
--volume "${actionFolder}/platforms/windows":"c:/steps" \
--volume "${actionFolder}/BlankProject":"c:/BlankProject" \
${image} \
powershell c:/steps/entrypoint.ps1`;
}
}
exports["default"] = Docker;
/***/ }),
/***/ 26574:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
class NotImplementedException extends Error {
constructor(message = '') {
super(message);
this.name = 'NotImplementedException';
}
}
exports["default"] = NotImplementedException;
/***/ }),
/***/ 97266:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
class ValidationError extends Error {
constructor(message = '') {
super(message);
this.name = 'ValidationError';
}
}
exports["default"] = ValidationError;
/***/ }),
/***/ 25145:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
const test_license_reader_1 = __nccwpck_require__(13963);
class Parameter {
}
class ImageEnvironmentFactory {
static getEnvVarString(parameters) {
const environmentVariables = ImageEnvironmentFactory.getEnvironmentVariables(parameters);
let string = '';
for (const p of environmentVariables) {
if (p.value === '' || p.value === undefined) {
continue;
}
if (p.name !== 'ANDROID_KEYSTORE_BASE64' && p.value.toString().includes(`\n`)) {
string += `--env ${p.name} `;
continue;
}
string += `--env ${p.name}="${p.value}" `;
}
return string;
}
static getEnvironmentVariables(parameters) {
const environmentVariables = [
{ name: 'UNITY_LICENSE', value: process.env.UNITY_LICENSE || test_license_reader_1.ReadLicense() },
{ name: 'UNITY_LICENSE_FILE', value: process.env.UNITY_LICENSE_FILE },
{ name: 'UNITY_EMAIL', value: process.env.UNITY_EMAIL },
{ name: 'UNITY_PASSWORD', value: process.env.UNITY_PASSWORD },
{ name: 'UNITY_SERIAL', value: parameters.unitySerial },
{ name: 'UNITY_VERSION', value: parameters.editorVersion },
{ name: 'USYM_UPLOAD_AUTH_TOKEN', value: process.env.USYM_UPLOAD_AUTH_TOKEN },
{ name: 'PROJECT_PATH', value: parameters.projectPath },
{ name: 'BUILD_TARGET', value: parameters.targetPlatform },
{ name: 'BUILD_NAME', value: parameters.buildName },
{ name: 'BUILD_PATH', value: parameters.buildPath },
{ name: 'BUILD_FILE', value: parameters.buildFile },
{ name: 'BUILD_METHOD', value: parameters.buildMethod },
{ name: 'VERSION', value: parameters.buildVersion },
{ name: 'ANDROID_VERSION_CODE', value: parameters.androidVersionCode },
{ name: 'ANDROID_KEYSTORE_NAME', value: parameters.androidKeystoreName },
{ name: 'ANDROID_KEYSTORE_BASE64', value: parameters.androidKeystoreBase64 },
{ name: 'ANDROID_KEYSTORE_PASS', value: parameters.androidKeystorePass },
{ name: 'ANDROID_KEYALIAS_NAME', value: parameters.androidKeyaliasName },
{ name: 'ANDROID_KEYALIAS_PASS', value: parameters.androidKeyaliasPass },
{ name: 'ANDROID_SDK_MANAGER_PARAMETERS', value: parameters.androidSdkManagerParameters },
{ name: 'CUSTOM_PARAMETERS', value: parameters.customParameters },
{ name: 'CHOWN_FILES_TO', value: parameters.chownFilesTo },
{ name: 'GITHUB_REF', value: process.env.GITHUB_REF },
{ name: 'GITHUB_SHA', value: process.env.GITHUB_SHA },
{ name: 'GITHUB_REPOSITORY', value: process.env.GITHUB_REPOSITORY },
{ name: 'GITHUB_ACTOR', value: process.env.GITHUB_ACTOR },
{ name: 'GITHUB_WORKFLOW', value: process.env.GITHUB_WORKFLOW },
{ name: 'GITHUB_HEAD_REF', value: process.env.GITHUB_HEAD_REF },
{ name: 'GITHUB_BASE_REF', value: process.env.GITHUB_BASE_REF },
{ name: 'GITHUB_EVENT_NAME', value: process.env.GITHUB_EVENT_NAME },
{ name: 'GITHUB_WORKSPACE', value: '/github/workspace' },
{ name: 'GITHUB_ACTION', value: process.env.GITHUB_ACTION },
{ name: 'GITHUB_EVENT_PATH', value: process.env.GITHUB_EVENT_PATH },
{ name: 'RUNNER_OS', value: process.env.RUNNER_OS },
{ name: 'RUNNER_TOOL_CACHE', value: process.env.RUNNER_TOOL_CACHE },
{ name: 'RUNNER_TEMP', value: process.env.RUNNER_TEMP },
{ name: 'RUNNER_WORKSPACE', value: process.env.RUNNER_WORKSPACE },
];
if (parameters.sshAgent)
environmentVariables.push({ name: 'SSH_AUTH_SOCK', value: '/ssh-agent' });
return environmentVariables;
}
}
exports["default"] = ImageEnvironmentFactory;
/***/ }),
/***/ 57648:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
const platform_1 = __importDefault(__nccwpck_require__(9707));
class ImageTag {
constructor(imageProperties) {
const { editorVersion = '2019.2.11f1', targetPlatform, customImage } = imageProperties;
if (!ImageTag.versionPattern.test(editorVersion)) {
throw new Error(`Invalid version "${editorVersion}".`);
}
// Todo we might as well skip this class for customImage.
// Either
this.customImage = customImage;
// Or
this.repository = 'unityci';
this.name = 'editor';
this.editorVersion = editorVersion;
this.targetPlatform = targetPlatform;
this.builderPlatform = ImageTag.getTargetPlatformToTargetPlatformSuffixMap(targetPlatform, editorVersion);
this.imagePlatformPrefix = ImageTag.getImagePlatformPrefixes(process.platform);
this.imageRollingVersion = 1; // will automatically roll to the latest non-breaking version.
}
static get versionPattern() {
return /^20\d{2}\.\d\.\w{3,4}|3$/;
}
static get targetPlatformSuffixes() {
return {
generic: '',
webgl: 'webgl',
mac: 'mac-mono',
windows: 'windows-mono',
windowsIl2cpp: 'windows-il2cpp',
wsaPlayer: 'universal-windows-platform',
linux: 'base',
linuxIl2cpp: 'linux-il2cpp',
android: 'android',
ios: 'ios',
tvos: 'appletv',
facebook: 'facebook',
};
}
static getImagePlatformPrefixes(platform) {
switch (platform) {
case 'win32':
return 'windows';
case 'linux':
return 'ubuntu';
default:
return '';
}
}
static getTargetPlatformToTargetPlatformSuffixMap(platform, version) {
const { generic, webgl, mac, windows, windowsIl2cpp, wsaPlayer, linux, linuxIl2cpp, android, ios, tvos, facebook } = ImageTag.targetPlatformSuffixes;
const [major, minor] = version.split('.').map((digit) => Number(digit));
// @see: https://docs.unity3d.com/ScriptReference/BuildTarget.html
switch (platform) {
case platform_1.default.types.StandaloneOSX:
return mac;
case platform_1.default.types.StandaloneWindows:
case platform_1.default.types.StandaloneWindows64:
// Can only build windows-il2cpp on a windows based system
if (process.platform === 'win32') {
// Unity versions before 2019.3 do not support il2cpp
if (major >= 2020 || (major === 2019 && minor >= 3)) {
return windowsIl2cpp;
}
else {
throw new Error(`Windows-based builds are only supported on 2019.3.X+ versions of Unity.
If you are trying to build for windows-mono, please use a Linux based OS.`);
}
}
return windows;
case platform_1.default.types.StandaloneLinux64: {
// Unity versions before 2019.3 do not support il2cpp
if (major >= 2020 || (major === 2019 && minor >= 3)) {
return linuxIl2cpp;
}
return linux;
}
case platform_1.default.types.iOS:
return ios;
case platform_1.default.types.Android:
return android;
case platform_1.default.types.WebGL:
return webgl;
case platform_1.default.types.WSAPlayer:
if (process.platform !== 'win32') {
throw new Error(`WSAPlayer can only be built on a windows base OS`);
}
return wsaPlayer;
case platform_1.default.types.PS4:
return windows;
case platform_1.default.types.XboxOne:
return windows;
case platform_1.default.types.tvOS:
if (process.platform !== 'win32') {
throw new Error(`tvOS can only be built on a windows base OS`);
}
return tvos;
case platform_1.default.types.Switch:
return windows;
// Unsupported
case platform_1.default.types.Lumin:
return windows;
case platform_1.default.types.BJM:
return windows;
case platform_1.default.types.Stadia:
return windows;
case platform_1.default.types.Facebook:
return facebook;
case platform_1.default.types.NoTarget:
return generic;
// Test specific
case platform_1.default.types.Test:
return generic;
default:
throw new Error(`
Platform must be one of the ones described in the documentation.
"${platform}" is currently not supported.`);
}
}
get tag() {
const versionAndPlatform = `${this.editorVersion}-${this.builderPlatform}`.replace(/-+$/, '');
return `${this.imagePlatformPrefix}-${versionAndPlatform}-${this.imageRollingVersion}`;
}
get image() {
return `${this.repository}/${this.name}`.replace(/^\/+/, '');
}
toString() {
const { image, tag, customImage } = this;
if (customImage)
return customImage;
return `${image}:${tag}`; // '0' here represents the docker repo version
}
}
exports["default"] = ImageTag;
/***/ }),
/***/ 41359:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.CloudRunner = exports.Versioning = exports.Unity = exports.Project = exports.Platform = exports.Output = exports.ImageTag = exports.Input = exports.Docker = exports.Cache = exports.BuildParameters = exports.Action = void 0;
const action_1 = __importDefault(__nccwpck_require__(89088));
exports.Action = action_1.default;
const build_parameters_1 = __importDefault(__nccwpck_require__(80787));
exports.BuildParameters = build_parameters_1.default;
const cache_1 = __importDefault(__nccwpck_require__(97134));
exports.Cache = cache_1.default;
const docker_1 = __importDefault(__nccwpck_require__(16934));
exports.Docker = docker_1.default;
const input_1 = __importDefault(__nccwpck_require__(91933));
exports.Input = input_1.default;
const image_tag_1 = __importDefault(__nccwpck_require__(57648));
exports.ImageTag = image_tag_1.default;
const output_1 = __importDefault(__nccwpck_require__(85487));
exports.Output = output_1.default;
const platform_1 = __importDefault(__nccwpck_require__(9707));
exports.Platform = platform_1.default;
const project_1 = __importDefault(__nccwpck_require__(88666));
exports.Project = project_1.default;
const unity_1 = __importDefault(__nccwpck_require__(70498));
exports.Unity = unity_1.default;
const versioning_1 = __importDefault(__nccwpck_require__(88729));
exports.Versioning = versioning_1.default;
const cloud_runner_1 = __importDefault(__nccwpck_require__(79144));
exports.CloudRunner = cloud_runner_1.default;
/***/ }),
/***/ 11091:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.ActionYamlReader = void 0;
const fs_1 = __importDefault(__nccwpck_require__(57147));
const path_1 = __importDefault(__nccwpck_require__(71017));
const yaml_1 = __importDefault(__nccwpck_require__(44603));
class ActionYamlReader {
constructor() {
let filename = `action.yml`;
if (!fs_1.default.existsSync(filename)) {
filename = path_1.default.join(__dirname, `..`, filename);
}
this.actionYamlParsed = yaml_1.default.parse(fs_1.default.readFileSync(filename).toString());
}
GetActionYamlValue(key) {
var _a;
return ((_a = this.actionYamlParsed.inputs[key]) === null || _a === void 0 ? void 0 : _a.description) || 'No description found in action.yml';
}
}
exports.ActionYamlReader = ActionYamlReader;
/***/ }),
/***/ 24271:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.GitRepoReader = void 0;
const console_1 = __nccwpck_require__(96206);
const system_1 = __importDefault(__nccwpck_require__(62177));
const fs_1 = __importDefault(__nccwpck_require__(57147));
const cloud_runner_system_1 = __nccwpck_require__(66879);
class GitRepoReader {
static GetSha() {
return '';
}
static GetRemote() {
return __awaiter(this, void 0, void 0, function* () {
return (yield cloud_runner_system_1.CloudRunnerSystem.Run(`git remote -v`))
.split(' ')[1]
.split('https://github.com/')[1]
.split('.git')[0];
});
}
static GetBranch() {
return __awaiter(this, void 0, void 0, function* () {
console_1.assert(fs_1.default.existsSync(`.git`));
return (yield system_1.default.run(`git branch`, [], {}, false)).split('*')[1].split(`\n`)[0].replace(/ /g, ``);
});
}
}
exports.GitRepoReader = GitRepoReader;
/***/ }),
/***/ 44990:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.GithubCliReader = void 0;
const cloud_runner_system_1 = __nccwpck_require__(66879);
const core = __importStar(__nccwpck_require__(42186));
class GithubCliReader {
static GetGitHubAuthToken() {
return __awaiter(this, void 0, void 0, function* () {
try {
const authStatus = yield cloud_runner_system_1.CloudRunnerSystem.Run(`gh auth status`, true);
if (authStatus.includes('You are not logged') || authStatus === '') {
return '';
}
return (yield cloud_runner_system_1.CloudRunnerSystem.Run(`gh auth status -t`))
.split(`Token: `)[1]
.replace(/ /g, '')
.replace(/\n/g, '');
}
catch (error) {
core.info(error || 'Failed to get github auth token from gh cli');
return '';
}
});
}
}
exports.GithubCliReader = GithubCliReader;
/***/ }),
/***/ 13963:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.ReadLicense = void 0;
const path_1 = __importDefault(__nccwpck_require__(71017));
const fs_1 = __importDefault(__nccwpck_require__(57147));
const yaml_1 = __importDefault(__nccwpck_require__(44603));
function ReadLicense() {
const pipelineFile = path_1.default.join(__dirname, `.github`, `workflows`, `cloud-runner-k8s-pipeline.yml`);
return fs_1.default.existsSync(pipelineFile) ? yaml_1.default.parse(fs_1.default.readFileSync(pipelineFile, 'utf8')).env.UNITY_LICENSE : '';
}
exports.ReadLicense = ReadLicense;
/***/ }),
/***/ 91933:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
const fs_1 = __importDefault(__nccwpck_require__(57147));
const path_1 = __importDefault(__nccwpck_require__(71017));
const git_repo_1 = __nccwpck_require__(24271);
const github_cli_1 = __nccwpck_require__(44990);
const platform_1 = __importDefault(__nccwpck_require__(9707));
const core = __nccwpck_require__(42186);
/**
* Input variables specified in workflows using "with" prop.
*
* Note that input is always passed as a string, even booleans.
*
* Todo: rename to UserInput and remove anything that is not direct input from the user / ci workflow
*/
class Input {
// also enabled debug logging for cloud runner
static get cloudRunnerTests() {
return Input.getInput(`cloudRunnerTests`) || Input.getInput(`CloudRunnerTests`) || false;
}
static getInput(query) {
const coreInput = core.getInput(query);
if (Input.githubInputEnabled && coreInput && coreInput !== '') {
return coreInput;
}
return Input.cliOptions !== undefined && Input.cliOptions[query] !== undefined
? Input.cliOptions[query]
: process.env[query] !== undefined
? process.env[query]
: process.env[Input.ToEnvVarFormat(query)]
? process.env[Input.ToEnvVarFormat(query)]
: '';
}
static get region() {
return Input.getInput('region') || 'eu-west-2';
}
static githubRepo() {
return __awaiter(this, void 0, void 0, function* () {
return (Input.getInput('GITHUB_REPOSITORY') ||
Input.getInput('GITHUB_REPO') ||
// todo - move this to some class specific for determining additional information
(yield git_repo_1.GitRepoReader.GetRemote()) ||
'game-ci/unity-builder');
});
}
static branch() {
return __awaiter(this, void 0, void 0, function* () {
if (yield git_repo_1.GitRepoReader.GetBranch()) {
// todo - move this to some class specific for determining additional information
return yield git_repo_1.GitRepoReader.GetBranch();
}
else if (Input.getInput(`GITHUB_REF`)) {
return Input.getInput(`GITHUB_REF`).replace('refs/', '').replace(`head/`, '');
}
else if (Input.getInput('branch')) {
return Input.getInput('branch');
}
else {
return 'main';
}
});
}
static get gitSha() {
if (Input.getInput(`GITHUB_SHA`)) {
return Input.getInput(`GITHUB_SHA`);
}
else if (Input.getInput(`GitSHA`)) {
return Input.getInput(`GitSHA`);
}
else if (git_repo_1.GitRepoReader.GetSha()) {
// todo - move this to some class specific for determining additional information
return git_repo_1.GitRepoReader.GetSha();
}
}
static get runNumber() {
return Input.getInput('GITHUB_RUN_NUMBER') || '0';
}
static get targetPlatform() {
return Input.getInput('targetPlatform') || platform_1.default.default;
}
static get unityVersion() {
return Input.getInput('unityVersion') || 'auto';
}
static get customImage() {
return Input.getInput('customImage');
}
static get projectPath() {
const input = Input.getInput('projectPath');
const rawProjectPath = input
? input
: fs_1.default.existsSync(path_1.default.join('test-project', 'ProjectSettings', 'ProjectVersion.txt')) &&
!fs_1.default.existsSync(path_1.default.join('ProjectSettings', 'ProjectVersion.txt'))
? 'test-project'
: '.';
return rawProjectPath.replace(/\/$/, '');
}
static get buildName() {
return Input.getInput('buildName') || this.targetPlatform;
}
static get buildsPath() {
return Input.getInput('buildsPath') || 'build';
}
static get buildMethod() {
return Input.getInput('buildMethod') || ''; // processed in docker file
}
static get customParameters() {
return Input.getInput('customParameters') || '';
}
static get versioningStrategy() {
return Input.getInput('versioning') || 'Semantic';
}
static get specifiedVersion() {
return Input.getInput('version') || '';
}
static get androidVersionCode() {
return Input.getInput('androidVersionCode');
}
static get androidAppBundle() {
const input = Input.getInput('androidAppBundle') || false;
return input === 'true';
}
static get androidKeystoreName() {
return Input.getInput('androidKeystoreName') || '';
}
static get androidKeystoreBase64() {
return Input.getInput('androidKeystoreBase64') || '';
}
static get androidKeystorePass() {
return Input.getInput('androidKeystorePass') || '';
}
static get androidKeyaliasName() {
return Input.getInput('androidKeyaliasName') || '';
}
static get androidKeyaliasPass() {
return Input.getInput('androidKeyaliasPass') || '';
}
static get androidTargetSdkVersion() {
return Input.getInput('androidTargetSdkVersion') || '';
}
static get sshAgent() {
return Input.getInput('sshAgent') || '';
}
static gitPrivateToken() {
return __awaiter(this, void 0, void 0, function* () {
return Input.getInput('gitPrivateToken') || (yield Input.githubToken());
});
}
static get chownFilesTo() {
return Input.getInput('chownFilesTo') || '';
}
static get allowDirtyBuild() {
const input = Input.getInput('allowDirtyBuild') || false;
return input === 'true';
}
static get postBuildSteps() {
return Input.getInput('postBuildSteps') || '';
}
static get preBuildSteps() {
return Input.getInput('preBuildSteps') || '';
}
static get customJob() {
return Input.getInput('customJob') || '';
}
static get awsBaseStackName() {
return Input.getInput('awsBaseStackName') || 'game-ci';
}
static get cloudRunnerCluster() {
return Input.getInput('cloudRunnerCluster') || 'local';
}
static get cloudRunnerCpu() {
return Input.getInput('cloudRunnerCpu') || '1.0';
}
static get cloudRunnerMemory() {
return Input.getInput('cloudRunnerMemory') || '750M';
}
static githubToken() {
return __awaiter(this, void 0, void 0, function* () {
// Todo - move GitHubCLI out of the simple input class. It is in fact not input from the user.
return Input.getInput('githubToken') || (yield github_cli_1.GithubCliReader.GetGitHubAuthToken()) || '';
});
}
static get kubeConfig() {
return Input.getInput('kubeConfig') || '';
}
static get kubeVolume() {
return Input.getInput('kubeVolume') || '';
}
static get kubeVolumeSize() {
return Input.getInput('kubeVolumeSize') || '5Gi';
}
static ToEnvVarFormat(input) {
return input
.replace(/([A-Z])/g, ' $1')
.trim()
.toUpperCase()
.replace(/ /g, '_');
}
}
Input.githubInputEnabled = true;
exports["default"] = Input;
/***/ }),
/***/ 39364:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
const exec_1 = __nccwpck_require__(71514);
class MacBuilder {
static run(actionFolder, workspace, buildParameters, silent = false) {
return __awaiter(this, void 0, void 0, function* () {
yield exec_1.exec('bash', [`${actionFolder}/platforms/mac/entrypoint.sh`], {
silent,
ignoreReturnCode: true,
});
});
}
}
exports["default"] = MacBuilder;
/***/ }),
/***/ 85487:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
const core = __nccwpck_require__(42186);
class Output {
static setBuildVersion(buildVersion) {
return __awaiter(this, void 0, void 0, function* () {
yield core.setOutput('buildVersion', buildVersion);
});
}
}
exports["default"] = Output;
/***/ }),
/***/ 64423:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
const platform_setup_1 = __nccwpck_require__(2014);
const validate_windows_1 = __importDefault(__nccwpck_require__(41563));
class PlatformSetup {
static setup(buildParameters, actionFolder) {
return __awaiter(this, void 0, void 0, function* () {
switch (process.platform) {
case 'win32':
validate_windows_1.default.validate(buildParameters);
platform_setup_1.SetupWindows.setup(buildParameters);
break;
case 'darwin':
yield platform_setup_1.SetupMac.setup(buildParameters, actionFolder);
break;
//Add other baseOS's here
}
});
}
}
exports["default"] = PlatformSetup;
/***/ }),
/***/ 2014:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.SetupMac = exports.SetupWindows = void 0;
const setup_windows_1 = __importDefault(__nccwpck_require__(37449));
exports.SetupWindows = setup_windows_1.default;
const setup_mac_1 = __importDefault(__nccwpck_require__(22466));
exports.SetupMac = setup_mac_1.default;
/***/ }),
/***/ 22466:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
const unity_changeset_1 = __nccwpck_require__(4635);
const exec_1 = __nccwpck_require__(71514);
const fs_1 = __importDefault(__nccwpck_require__(57147));
class SetupMac {
static setup(buildParameters, actionFolder) {
return __awaiter(this, void 0, void 0, function* () {
const unityEditorPath = `/Applications/Unity/Hub/Editor/${buildParameters.editorVersion}/Unity.app/Contents/MacOS/Unity`;
// Only install unity if the editor doesn't already exist
if (!fs_1.default.existsSync(unityEditorPath)) {
yield SetupMac.installUnityHub();
yield SetupMac.installUnity(buildParameters);
}
yield SetupMac.setEnvironmentVariables(buildParameters, actionFolder);
});
}
static installUnityHub(silent = false) {
return __awaiter(this, void 0, void 0, function* () {
const command = 'brew install unity-hub';
if (!fs_1.default.existsSync(this.unityHubPath)) {
// Ignoring return code because the log seems to overflow the internal buffer which triggers
// a false error
const errorCode = yield exec_1.exec(command, undefined, { silent, ignoreReturnCode: true });
if (errorCode) {
throw new Error(`There was an error installing the Unity Editor. See logs above for details.`);
}
}
});
}
static installUnity(buildParameters, silent = false) {
return __awaiter(this, void 0, void 0, function* () {
const unityChangeset = yield unity_changeset_1.getUnityChangeset(buildParameters.editorVersion);
const command = `${this.unityHubPath} -- --headless install \
--version ${buildParameters.editorVersion} \
--changeset ${unityChangeset.changeset} \
--module mac-il2cpp \
--childModules`;
// Ignoring return code because the log seems to overflow the internal buffer which triggers
// a false error
const errorCode = yield exec_1.exec(command, undefined, { silent, ignoreReturnCode: true });
if (errorCode) {
throw new Error(`There was an error installing the Unity Editor. See logs above for details.`);
}
});
}
static setEnvironmentVariables(buildParameters, actionFolder) {
return __awaiter(this, void 0, void 0, function* () {
// Need to set environment variables from here because we execute
// the scripts on the host for mac
process.env.ACTION_FOLDER = actionFolder;
process.env.UNITY_VERSION = buildParameters.editorVersion;
process.env.UNITY_SERIAL = buildParameters.unitySerial;
process.env.PROJECT_PATH = buildParameters.projectPath;
process.env.BUILD_TARGET = buildParameters.targetPlatform;
process.env.BUILD_NAME = buildParameters.buildName;
process.env.BUILD_PATH = buildParameters.buildPath;
process.env.BUILD_FILE = buildParameters.buildFile;
process.env.BUILD_METHOD = buildParameters.buildMethod;
process.env.VERSION = buildParameters.buildVersion;
process.env.ANDROID_VERSION_CODE = buildParameters.androidVersionCode;
process.env.ANDROID_KEYSTORE_NAME = buildParameters.androidKeystoreName;
process.env.ANDROID_KEYSTORE_BASE64 = buildParameters.androidKeystoreBase64;
process.env.ANDROID_KEYSTORE_PASS = buildParameters.androidKeystorePass;
process.env.ANDROID_KEYALIAS_NAME = buildParameters.androidKeyaliasName;
process.env.ANDROID_KEYALIAS_PASS = buildParameters.androidKeyaliasPass;
process.env.ANDROID_TARGET_SDK_VERSION = buildParameters.androidTargetSdkVersion;
process.env.ANDROID_SDK_MANAGER_PARAMETERS = buildParameters.androidSdkManagerParameters;
process.env.CUSTOM_PARAMETERS = buildParameters.customParameters;
process.env.CHOWN_FILES_TO = buildParameters.chownFilesTo;
});
}
}
SetupMac.unityHubPath = `"/Applications/Unity Hub.app/Contents/MacOS/Unity Hub"`;
exports["default"] = SetupMac;
/***/ }),
/***/ 37449:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
const exec_1 = __nccwpck_require__(71514);
const fs_1 = __importDefault(__nccwpck_require__(57147));
class SetupWindows {
static setup(buildParameters) {
return __awaiter(this, void 0, void 0, function* () {
const { targetPlatform } = buildParameters;
yield SetupWindows.setupWindowsRun(targetPlatform);
});
}
static setupWindowsRun(targetPlatform, silent = false) {
return __awaiter(this, void 0, void 0, function* () {
if (!fs_1.default.existsSync('c:/regkeys')) {
fs_1.default.mkdirSync('c:/regkeys');
}
switch (targetPlatform) {
//These all need the Windows 10 SDK
case 'StandaloneWindows':
case 'StandaloneWindows64':
case 'WSAPlayer':
yield this.generateWinSDKRegKeys(silent);
break;
}
});
}
static generateWinSDKRegKeys(silent = false) {
return __awaiter(this, void 0, void 0, function* () {
// Export registry keys that point to the Windows 10 SDK
const exportWinSDKRegKeysCommand = 'reg export "HKLM\\SOFTWARE\\WOW6432Node\\Microsoft\\Microsoft SDKs\\Windows\\v10.0" c:/regkeys/winsdk.reg /y';
yield exec_1.exec(exportWinSDKRegKeysCommand, undefined, { silent });
});
}
}
exports["default"] = SetupWindows;
/***/ }),
/***/ 41563:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
const fs_1 = __importDefault(__nccwpck_require__(57147));
class ValidateWindows {
static validate(buildParameters) {
ValidateWindows.validateWindowsPlatformRequirements(buildParameters.targetPlatform);
if (!(process.env.UNITY_EMAIL && process.env.UNITY_PASSWORD)) {
throw new Error(`Unity email and password must be set for Windows based builds to
authenticate the license. Make sure to set them inside UNITY_EMAIL
and UNITY_PASSWORD in Github Secrets and pass them into the environment.`);
}
}
static validateWindowsPlatformRequirements(platform) {
switch (platform) {
case 'StandaloneWindows':
this.checkForVisualStudio();
this.checkForWin10SDK();
break;
case 'StandaloneWindows64':
this.checkForVisualStudio();
this.checkForWin10SDK();
break;
case 'WSAPlayer':
this.checkForVisualStudio();
this.checkForWin10SDK();
break;
case 'tvOS':
this.checkForVisualStudio();
break;
}
}
static checkForWin10SDK() {
//Check for Windows 10 SDK on runner
const windows10SDKPathExists = fs_1.default.existsSync('C:/Program Files (x86)/Windows Kits');
if (!windows10SDKPathExists) {
throw new Error(`Windows 10 SDK not found in default location. Make sure
the runner has a Windows 10 SDK installed in the default
location.`);
}
}
static checkForVisualStudio() {
//Note: When upgrading to Server 2022, we will need to move to just "program files" since VS will be 64-bit
const visualStudioInstallPathExists = fs_1.default.existsSync('C:/Program Files (x86)/Microsoft Visual Studio');
const visualStudioDataPathExists = fs_1.default.existsSync('C:/ProgramData/Microsoft/VisualStudio');
if (!visualStudioInstallPathExists || !visualStudioDataPathExists) {
throw new Error(`Visual Studio not found at the default location.
Make sure the runner has Visual Studio installed in the
default location`);
}
}
}
exports["default"] = ValidateWindows;
/***/ }),
/***/ 9707:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
class Platform {
static get default() {
return Platform.types.StandaloneWindows64;
}
static get types() {
return {
StandaloneOSX: 'StandaloneOSX',
StandaloneWindows: 'StandaloneWindows',
StandaloneWindows64: 'StandaloneWindows64',
StandaloneLinux64: 'StandaloneLinux64',
iOS: 'iOS',
Android: 'Android',
WebGL: 'WebGL',
WSAPlayer: 'WSAPlayer',
PS4: 'PS4',
XboxOne: 'XboxOne',
tvOS: 'tvOS',
Switch: 'Switch',
// Unsupported
Lumin: 'Lumin',
BJM: 'BJM',
Stadia: 'Stadia',
Facebook: 'Facebook',
NoTarget: 'NoTarget',
// Test specific
Test: 'Test',
};
}
static isWindows(platform) {
switch (platform) {
case Platform.types.StandaloneWindows:
case Platform.types.StandaloneWindows64:
return true;
default:
return false;
}
}
static isAndroid(platform) {
switch (platform) {
case Platform.types.Android:
return true;
default:
return false;
}
}
}
exports["default"] = Platform;
/***/ }),
/***/ 88666:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
const input_1 = __importDefault(__nccwpck_require__(91933));
const unity_1 = __importDefault(__nccwpck_require__(70498));
const action_1 = __importDefault(__nccwpck_require__(89088));
class Project {
static get relativePath() {
const { projectPath } = input_1.default;
return `${projectPath}`;
}
static get absolutePath() {
const { workspace } = action_1.default;
return `${workspace}/${this.relativePath}`;
}
static get libraryFolder() {
return `${this.relativePath}/${unity_1.default.libraryFolder}`;
}
}
exports["default"] = Project;
/***/ }),
/***/ 62177:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
const core = __importStar(__nccwpck_require__(42186));
const exec_1 = __nccwpck_require__(71514);
class System {
static run(command, arguments_ = [], options = {}, shouldLog = true) {
return __awaiter(this, void 0, void 0, function* () {
let result = '';
let error = '';
let debug = '';
const listeners = {
stdout: (dataBuffer) => {
result += dataBuffer.toString();
},
stderr: (dataBuffer) => {
error += dataBuffer.toString();
},
debug: (dataString) => {
debug += dataString.toString();
},
};
const showOutput = () => {
if (debug !== '' && shouldLog) {
core.debug(debug);
}
if (result !== '' && shouldLog) {
core.info(result);
}
if (error !== '' && shouldLog) {
core.warning(error);
}
};
const throwContextualError = (message) => {
let commandAsString = command;
if (Array.isArray(arguments_)) {
commandAsString += ` ${arguments_.join(' ')}`;
}
else if (typeof arguments_ === 'string') {
commandAsString += ` ${arguments_}`;
}
throw new Error(`Failed to run "${commandAsString}".\n ${message}`);
};
try {
if (command.trim() === '') {
throw new Error(`Failed to execute empty command`);
}
const exitCode = yield exec_1.exec(command, arguments_, Object.assign({ silent: true, listeners }, options));
showOutput();
if (exitCode !== 0) {
throwContextualError(`Command returned non-zero exit code.\nError: ${error}`);
}
}
catch (inCommandError) {
showOutput();
throwContextualError(`In-command error caught: ${inCommandError}`);
}
return result;
});
}
}
exports["default"] = System;
/***/ }),
/***/ 17146:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
const fs = __importStar(__nccwpck_require__(57147));
const path_1 = __importDefault(__nccwpck_require__(71017));
class UnityVersioning {
static get versionPattern() {
return /20\d{2}\.\d\.\w{3,4}|3/;
}
static determineUnityVersion(projectPath, unityVersion) {
if (unityVersion === 'auto') {
return UnityVersioning.read(projectPath);
}
return unityVersion;
}
static read(projectPath) {
const filePath = path_1.default.join(projectPath, 'ProjectSettings', 'ProjectVersion.txt');
if (!fs.existsSync(filePath)) {
throw new Error(`Project settings file not found at "${filePath}". Have you correctly set the projectPath?`);
}
return UnityVersioning.parse(fs.readFileSync(filePath, 'utf8'));
}
static parse(projectVersionTxt) {
const matches = projectVersionTxt.match(UnityVersioning.versionPattern);
if (!matches || matches.length === 0) {
throw new Error(`Failed to parse version from "${projectVersionTxt}".`);
}
return matches[0];
}
}
exports["default"] = UnityVersioning;
/***/ }),
/***/ 70498:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
class Unity {
static get libraryFolder() {
return 'Library';
}
}
exports["default"] = Unity;
/***/ }),
/***/ 88729:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
const core = __importStar(__nccwpck_require__(42186));
const not_implemented_exception_1 = __importDefault(__nccwpck_require__(26574));
const validation_error_1 = __importDefault(__nccwpck_require__(97266));
const input_1 = __importDefault(__nccwpck_require__(91933));
const system_1 = __importDefault(__nccwpck_require__(62177));
class Versioning {
static get projectPath() {
return input_1.default.projectPath;
}
static get isDirtyAllowed() {
return input_1.default.allowDirtyBuild;
}
static get strategies() {
return { None: 'None', Semantic: 'Semantic', Tag: 'Tag', Custom: 'Custom' };
}
/**
* Get the branch name of the (related) branch
*/
static get branch() {
// Todo - use optional chaining (https://github.com/zeit/ncc/issues/534)
return this.headRef || (this.ref && this.ref.slice(11));
}
/**
* For pull requests we can reliably use GITHUB_HEAD_REF
*/
static get headRef() {
return process.env.GITHUB_HEAD_REF;
}
/**
* For branches GITHUB_REF will have format `refs/heads/feature-branch-1`
*/
static get ref() {
return process.env.GITHUB_REF;
}
/**
* The commit SHA that triggered the workflow run.
*/
static get sha() {
return process.env.GITHUB_SHA;
}
/**
* Maximum number of lines to print when logging the git diff
*/
static get maxDiffLines() {
return 60;
}
/**
* Log up to maxDiffLines of the git diff.
*/
static logDiff() {
return __awaiter(this, void 0, void 0, function* () {
const diffCommand = `git --no-pager diff | head -n ${this.maxDiffLines.toString()}`;
yield system_1.default.run('sh', undefined, {
input: Buffer.from(diffCommand),
silent: true,
});
});
}
/**
* Regex to parse version description into separate fields
*/
static get descriptionRegex1() {
return /^v?([\d.]+)-(\d+)-g(\w+)-?(\w+)*/g;
}
static get descriptionRegex2() {
return /^v?([\d.]+-\w+)-(\d+)-g(\w+)-?(\w+)*/g;
}
static get descriptionRegex3() {
return /^v?([\d.]+-\w+\.\d+)-(\d+)-g(\w+)-?(\w+)*/g;
}
static determineBuildVersion(strategy, inputVersion) {
return __awaiter(this, void 0, void 0, function* () {
// Validate input
if (!Object.hasOwnProperty.call(this.strategies, strategy)) {
throw new validation_error_1.default(`Versioning strategy should be one of ${Object.values(this.strategies).join(', ')}.`);
}
let version;
switch (strategy) {
case this.strategies.None:
version = 'none';
break;
case this.strategies.Custom:
version = inputVersion;
break;
case this.strategies.Semantic:
version = yield this.generateSemanticVersion();
break;
case this.strategies.Tag:
version = yield this.generateTagVersion();
break;
default:
throw new not_implemented_exception_1.default(`Strategy ${strategy} is not implemented.`);
}
return version;
});
}
/**
* Automatically generates a version based on SemVer out of the box.
*
* The version works as follows: `..` for example `0.1.2`.
*
* The latest tag dictates `.`
* The number of commits since that tag dictates``.
*
* @See: https://semver.org/
*/
static generateSemanticVersion() {
return __awaiter(this, void 0, void 0, function* () {
if (yield this.isShallow()) {
yield this.fetch();
}
yield this.logDiff();
if ((yield this.isDirty()) && !this.isDirtyAllowed) {
throw new Error('Branch is dirty. Refusing to base semantic version on uncommitted changes');
}
if (!(yield this.hasAnyVersionTags())) {
const version = `0.0.${yield this.getTotalNumberOfCommits()}`;
core.info(`Generated version ${version} (no version tags found).`);
return version;
}
const versionDescriptor = yield this.parseSemanticVersion();
if (versionDescriptor) {
const { tag, commits, hash } = versionDescriptor;
// Ensure 3 digits (commits should always be patch level)
const [major, minor, patch] = `${tag}.${commits}`.split('.');
const threeDigitVersion = /^\d+$/.test(patch) ? `${major}.${minor}.${patch}` : `${major}.0.${minor}`;
core.info(`Found semantic version ${threeDigitVersion} for ${this.branch}@${hash}`);
return `${threeDigitVersion}`;
}
const version = `0.0.${yield this.getTotalNumberOfCommits()}`;
core.info(`Generated version ${version} (semantic version couldn't be determined).`);
return version;
});
}
/**
* Generate the proper version for unity based on an existing tag.
*/
static generateTagVersion() {
return __awaiter(this, void 0, void 0, function* () {
let tag = yield this.getTag();
if (tag.charAt(0) === 'v') {
tag = tag.slice(1);
}
return tag;
});
}
/**
* Parses the versionDescription into their named parts.
*/
static parseSemanticVersion() {
return __awaiter(this, void 0, void 0, function* () {
const description = yield this.getVersionDescription();
try {
const [match, tag, commits, hash] = this.descriptionRegex1.exec(description);
return {
match,
tag,
commits,
hash,
};
}
catch (_a) {
try {
const [match, tag, commits, hash] = this.descriptionRegex2.exec(description);
return {
match,
tag,
commits,
hash,
};
}
catch (_b) {
try {
const [match, tag, commits, hash] = this.descriptionRegex3.exec(description);
return {
match,
tag,
commits,
hash,
};
}
catch (_c) {
core.warning(`Failed to parse git describe output or version can not be determined through: "${description}".`);
return false;
}
}
}
});
}
/**
* Returns whether the repository is shallow.
*/
static isShallow() {
return __awaiter(this, void 0, void 0, function* () {
const output = yield this.git(['rev-parse', '--is-shallow-repository']);
return output !== 'false\n';
});
}
/**
* Retrieves refs from the configured remote.
*
* Fetch unshallow for incomplete repository, but fall back to normal fetch.
*
* Note: `--all` should not be used, and would break fetching for push event.
*/
static fetch() {
return __awaiter(this, void 0, void 0, function* () {
try {
yield this.git(['fetch', '--unshallow']);
}
catch (error) {
core.warning(`Fetch --unshallow caught: ${error}`);
yield this.git(['fetch']);
}
});
}
/**
* Retrieves information about the branch.
*
* Format: `v0.12-24-gd2198ab`
*
* In this format v0.12 is the latest tag, 24 are the number of commits since, and gd2198ab
* identifies the current commit.
*/
static getVersionDescription() {
return __awaiter(this, void 0, void 0, function* () {
return this.git(['describe', '--long', '--tags', '--always', this.sha]);
});
}
/**
* Returns whether there are uncommitted changes that are not ignored.
*/
static isDirty() {
return __awaiter(this, void 0, void 0, function* () {
const output = yield this.git(['status', '--porcelain']);
const isDirty = output !== '';
if (isDirty) {
core.warning('Changes were made to the following files and folders:\n');
core.warning(output);
}
return isDirty;
});
}
/**
* Get the tag if there is one pointing at HEAD
*/
static getTag() {
return __awaiter(this, void 0, void 0, function* () {
return (yield this.git(['tag', '--points-at', 'HEAD'])).trim();
});
}
/**
* Whether or not the repository has any version tags yet.
*/
static hasAnyVersionTags() {
return __awaiter(this, void 0, void 0, function* () {
const numberOfCommitsAsString = yield system_1.default.run('sh', undefined, {
input: Buffer.from('git tag --list --merged HEAD | grep v[0-9]* | wc -l'),
cwd: this.projectPath,
silent: false,
});
const numberOfCommits = Number.parseInt(numberOfCommitsAsString, 10);
return numberOfCommits !== 0;
});
}
/**
* Get the total number of commits on head.
*
* Note: HEAD should not be used, as it may be detached, resulting in an additional count.
*/
static getTotalNumberOfCommits() {
return __awaiter(this, void 0, void 0, function* () {
const numberOfCommitsAsString = yield this.git(['rev-list', '--count', this.sha]);
return Number.parseInt(numberOfCommitsAsString, 10);
});
}
/**
* Run git in the specified project path
*/
static git(arguments_, options = {}) {
return __awaiter(this, void 0, void 0, function* () {
return system_1.default.run('git', arguments_, Object.assign({ cwd: this.projectPath }, options));
});
}
}
exports["default"] = Versioning;
/***/ }),
/***/ 87351:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.issue = exports.issueCommand = void 0;
const os = __importStar(__nccwpck_require__(22037));
const utils_1 = __nccwpck_require__(5278);
/**
* Commands
*
* Command Format:
* ::name key=value,key=value::message
*
* Examples:
* ::warning::This is the message
* ::set-env name=MY_VAR::some value
*/
function issueCommand(command, properties, message) {
const cmd = new Command(command, properties, message);
process.stdout.write(cmd.toString() + os.EOL);
}
exports.issueCommand = issueCommand;
function issue(name, message = '') {
issueCommand(name, {}, message);
}
exports.issue = issue;
const CMD_STRING = '::';
class Command {
constructor(command, properties, message) {
if (!command) {
command = 'missing.command';
}
this.command = command;
this.properties = properties;
this.message = message;
}
toString() {
let cmdStr = CMD_STRING + this.command;
if (this.properties && Object.keys(this.properties).length > 0) {
cmdStr += ' ';
let first = true;
for (const key in this.properties) {
if (this.properties.hasOwnProperty(key)) {
const val = this.properties[key];
if (val) {
if (first) {
first = false;
}
else {
cmdStr += ',';
}
cmdStr += `${key}=${escapeProperty(val)}`;
}
}
}
}
cmdStr += `${CMD_STRING}${escapeData(this.message)}`;
return cmdStr;
}
}
function escapeData(s) {
return utils_1.toCommandValue(s)
.replace(/%/g, '%25')
.replace(/\r/g, '%0D')
.replace(/\n/g, '%0A');
}
function escapeProperty(s) {
return utils_1.toCommandValue(s)
.replace(/%/g, '%25')
.replace(/\r/g, '%0D')
.replace(/\n/g, '%0A')
.replace(/:/g, '%3A')
.replace(/,/g, '%2C');
}
//# sourceMappingURL=command.js.map
/***/ }),
/***/ 42186:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.getIDToken = exports.getState = exports.saveState = exports.group = exports.endGroup = exports.startGroup = exports.info = exports.notice = exports.warning = exports.error = exports.debug = exports.isDebug = exports.setFailed = exports.setCommandEcho = exports.setOutput = exports.getBooleanInput = exports.getMultilineInput = exports.getInput = exports.addPath = exports.setSecret = exports.exportVariable = exports.ExitCode = void 0;
const command_1 = __nccwpck_require__(87351);
const file_command_1 = __nccwpck_require__(717);
const utils_1 = __nccwpck_require__(5278);
const os = __importStar(__nccwpck_require__(22037));
const path = __importStar(__nccwpck_require__(71017));
const oidc_utils_1 = __nccwpck_require__(98041);
/**
* The code to exit an action
*/
var ExitCode;
(function (ExitCode) {
/**
* A code indicating that the action was successful
*/
ExitCode[ExitCode["Success"] = 0] = "Success";
/**
* A code indicating that the action was a failure
*/
ExitCode[ExitCode["Failure"] = 1] = "Failure";
})(ExitCode = exports.ExitCode || (exports.ExitCode = {}));
//-----------------------------------------------------------------------
// Variables
//-----------------------------------------------------------------------
/**
* Sets env variable for this action and future actions in the job
* @param name the name of the variable to set
* @param val the value of the variable. Non-string values will be converted to a string via JSON.stringify
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
function exportVariable(name, val) {
const convertedVal = utils_1.toCommandValue(val);
process.env[name] = convertedVal;
const filePath = process.env['GITHUB_ENV'] || '';
if (filePath) {
const delimiter = '_GitHubActionsFileCommandDelimeter_';
const commandValue = `${name}<<${delimiter}${os.EOL}${convertedVal}${os.EOL}${delimiter}`;
file_command_1.issueCommand('ENV', commandValue);
}
else {
command_1.issueCommand('set-env', { name }, convertedVal);
}
}
exports.exportVariable = exportVariable;
/**
* Registers a secret which will get masked from logs
* @param secret value of the secret
*/
function setSecret(secret) {
command_1.issueCommand('add-mask', {}, secret);
}
exports.setSecret = setSecret;
/**
* Prepends inputPath to the PATH (for this action and future actions)
* @param inputPath
*/
function addPath(inputPath) {
const filePath = process.env['GITHUB_PATH'] || '';
if (filePath) {
file_command_1.issueCommand('PATH', inputPath);
}
else {
command_1.issueCommand('add-path', {}, inputPath);
}
process.env['PATH'] = `${inputPath}${path.delimiter}${process.env['PATH']}`;
}
exports.addPath = addPath;
/**
* Gets the value of an input.
* Unless trimWhitespace is set to false in InputOptions, the value is also trimmed.
* Returns an empty string if the value is not defined.
*
* @param name name of the input to get
* @param options optional. See InputOptions.
* @returns string
*/
function getInput(name, options) {
const val = process.env[`INPUT_${name.replace(/ /g, '_').toUpperCase()}`] || '';
if (options && options.required && !val) {
throw new Error(`Input required and not supplied: ${name}`);
}
if (options && options.trimWhitespace === false) {
return val;
}
return val.trim();
}
exports.getInput = getInput;
/**
* Gets the values of an multiline input. Each value is also trimmed.
*
* @param name name of the input to get
* @param options optional. See InputOptions.
* @returns string[]
*
*/
function getMultilineInput(name, options) {
const inputs = getInput(name, options)
.split('\n')
.filter(x => x !== '');
return inputs;
}
exports.getMultilineInput = getMultilineInput;
/**
* Gets the input value of the boolean type in the YAML 1.2 "core schema" specification.
* Support boolean input list: `true | True | TRUE | false | False | FALSE` .
* The return value is also in boolean type.
* ref: https://yaml.org/spec/1.2/spec.html#id2804923
*
* @param name name of the input to get
* @param options optional. See InputOptions.
* @returns boolean
*/
function getBooleanInput(name, options) {
const trueValue = ['true', 'True', 'TRUE'];
const falseValue = ['false', 'False', 'FALSE'];
const val = getInput(name, options);
if (trueValue.includes(val))
return true;
if (falseValue.includes(val))
return false;
throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name}\n` +
`Support boolean input list: \`true | True | TRUE | false | False | FALSE\``);
}
exports.getBooleanInput = getBooleanInput;
/**
* Sets the value of an output.
*
* @param name name of the output to set
* @param value value to store. Non-string values will be converted to a string via JSON.stringify
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
function setOutput(name, value) {
process.stdout.write(os.EOL);
command_1.issueCommand('set-output', { name }, value);
}
exports.setOutput = setOutput;
/**
* Enables or disables the echoing of commands into stdout for the rest of the step.
* Echoing is disabled by default if ACTIONS_STEP_DEBUG is not set.
*
*/
function setCommandEcho(enabled) {
command_1.issue('echo', enabled ? 'on' : 'off');
}
exports.setCommandEcho = setCommandEcho;
//-----------------------------------------------------------------------
// Results
//-----------------------------------------------------------------------
/**
* Sets the action status to failed.
* When the action exits it will be with an exit code of 1
* @param message add error issue message
*/
function setFailed(message) {
process.exitCode = ExitCode.Failure;
error(message);
}
exports.setFailed = setFailed;
//-----------------------------------------------------------------------
// Logging Commands
//-----------------------------------------------------------------------
/**
* Gets whether Actions Step Debug is on or not
*/
function isDebug() {
return process.env['RUNNER_DEBUG'] === '1';
}
exports.isDebug = isDebug;
/**
* Writes debug message to user log
* @param message debug message
*/
function debug(message) {
command_1.issueCommand('debug', {}, message);
}
exports.debug = debug;
/**
* Adds an error issue
* @param message error issue message. Errors will be converted to string via toString()
* @param properties optional properties to add to the annotation.
*/
function error(message, properties = {}) {
command_1.issueCommand('error', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message);
}
exports.error = error;
/**
* Adds a warning issue
* @param message warning issue message. Errors will be converted to string via toString()
* @param properties optional properties to add to the annotation.
*/
function warning(message, properties = {}) {
command_1.issueCommand('warning', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message);
}
exports.warning = warning;
/**
* Adds a notice issue
* @param message notice issue message. Errors will be converted to string via toString()
* @param properties optional properties to add to the annotation.
*/
function notice(message, properties = {}) {
command_1.issueCommand('notice', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message);
}
exports.notice = notice;
/**
* Writes info to log with console.log.
* @param message info message
*/
function info(message) {
process.stdout.write(message + os.EOL);
}
exports.info = info;
/**
* Begin an output group.
*
* Output until the next `groupEnd` will be foldable in this group
*
* @param name The name of the output group
*/
function startGroup(name) {
command_1.issue('group', name);
}
exports.startGroup = startGroup;
/**
* End an output group.
*/
function endGroup() {
command_1.issue('endgroup');
}
exports.endGroup = endGroup;
/**
* Wrap an asynchronous function call in a group.
*
* Returns the same type as the function itself.
*
* @param name The name of the group
* @param fn The function to wrap in the group
*/
function group(name, fn) {
return __awaiter(this, void 0, void 0, function* () {
startGroup(name);
let result;
try {
result = yield fn();
}
finally {
endGroup();
}
return result;
});
}
exports.group = group;
//-----------------------------------------------------------------------
// Wrapper action state
//-----------------------------------------------------------------------
/**
* Saves state for current action, the state can only be retrieved by this action's post job execution.
*
* @param name name of the state to store
* @param value value to store. Non-string values will be converted to a string via JSON.stringify
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
function saveState(name, value) {
command_1.issueCommand('save-state', { name }, value);
}
exports.saveState = saveState;
/**
* Gets the value of an state set by this action's main execution.
*
* @param name name of the state to get
* @returns string
*/
function getState(name) {
return process.env[`STATE_${name}`] || '';
}
exports.getState = getState;
function getIDToken(aud) {
return __awaiter(this, void 0, void 0, function* () {
return yield oidc_utils_1.OidcClient.getIDToken(aud);
});
}
exports.getIDToken = getIDToken;
//# sourceMappingURL=core.js.map
/***/ }),
/***/ 717:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
// For internal use, subject to change.
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.issueCommand = void 0;
// We use any as a valid input type
/* eslint-disable @typescript-eslint/no-explicit-any */
const fs = __importStar(__nccwpck_require__(57147));
const os = __importStar(__nccwpck_require__(22037));
const utils_1 = __nccwpck_require__(5278);
function issueCommand(command, message) {
const filePath = process.env[`GITHUB_${command}`];
if (!filePath) {
throw new Error(`Unable to find environment variable for file command ${command}`);
}
if (!fs.existsSync(filePath)) {
throw new Error(`Missing file at path: ${filePath}`);
}
fs.appendFileSync(filePath, `${utils_1.toCommandValue(message)}${os.EOL}`, {
encoding: 'utf8'
});
}
exports.issueCommand = issueCommand;
//# sourceMappingURL=file-command.js.map
/***/ }),
/***/ 98041:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.OidcClient = void 0;
const http_client_1 = __nccwpck_require__(39925);
const auth_1 = __nccwpck_require__(23702);
const core_1 = __nccwpck_require__(42186);
class OidcClient {
static createHttpClient(allowRetry = true, maxRetry = 10) {
const requestOptions = {
allowRetries: allowRetry,
maxRetries: maxRetry
};
return new http_client_1.HttpClient('actions/oidc-client', [new auth_1.BearerCredentialHandler(OidcClient.getRequestToken())], requestOptions);
}
static getRequestToken() {
const token = process.env['ACTIONS_ID_TOKEN_REQUEST_TOKEN'];
if (!token) {
throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable');
}
return token;
}
static getIDTokenUrl() {
const runtimeUrl = process.env['ACTIONS_ID_TOKEN_REQUEST_URL'];
if (!runtimeUrl) {
throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable');
}
return runtimeUrl;
}
static getCall(id_token_url) {
var _a;
return __awaiter(this, void 0, void 0, function* () {
const httpclient = OidcClient.createHttpClient();
const res = yield httpclient
.getJson(id_token_url)
.catch(error => {
throw new Error(`Failed to get ID Token. \n
Error Code : ${error.statusCode}\n
Error Message: ${error.result.message}`);
});
const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value;
if (!id_token) {
throw new Error('Response json body do not have ID Token field');
}
return id_token;
});
}
static getIDToken(audience) {
return __awaiter(this, void 0, void 0, function* () {
try {
// New ID Token is requested from action service
let id_token_url = OidcClient.getIDTokenUrl();
if (audience) {
const encodedAudience = encodeURIComponent(audience);
id_token_url = `${id_token_url}&audience=${encodedAudience}`;
}
core_1.debug(`ID token url is ${id_token_url}`);
const id_token = yield OidcClient.getCall(id_token_url);
core_1.setSecret(id_token);
return id_token;
}
catch (error) {
throw new Error(`Error message: ${error.message}`);
}
});
}
}
exports.OidcClient = OidcClient;
//# sourceMappingURL=oidc-utils.js.map
/***/ }),
/***/ 5278:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
// We use any as a valid input type
/* eslint-disable @typescript-eslint/no-explicit-any */
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.toCommandProperties = exports.toCommandValue = void 0;
/**
* Sanitizes an input into a string so it can be passed into issueCommand safely
* @param input input to sanitize into a string
*/
function toCommandValue(input) {
if (input === null || input === undefined) {
return '';
}
else if (typeof input === 'string' || input instanceof String) {
return input;
}
return JSON.stringify(input);
}
exports.toCommandValue = toCommandValue;
/**
*
* @param annotationProperties
* @returns The command properties to send with the actual annotation command
* See IssueCommandProperties: https://github.com/actions/runner/blob/main/src/Runner.Worker/ActionCommandManager.cs#L646
*/
function toCommandProperties(annotationProperties) {
if (!Object.keys(annotationProperties).length) {
return {};
}
return {
title: annotationProperties.title,
file: annotationProperties.file,
line: annotationProperties.startLine,
endLine: annotationProperties.endLine,
col: annotationProperties.startColumn,
endColumn: annotationProperties.endColumn
};
}
exports.toCommandProperties = toCommandProperties;
//# sourceMappingURL=utils.js.map
/***/ }),
/***/ 71514:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.getExecOutput = exports.exec = void 0;
const string_decoder_1 = __nccwpck_require__(71576);
const tr = __importStar(__nccwpck_require__(88159));
/**
* Exec a command.
* Output will be streamed to the live console.
* Returns promise with return code
*
* @param commandLine command to execute (can include additional args). Must be correctly escaped.
* @param args optional arguments for tool. Escaping is handled by the lib.
* @param options optional exec options. See ExecOptions
* @returns Promise exit code
*/
function exec(commandLine, args, options) {
return __awaiter(this, void 0, void 0, function* () {
const commandArgs = tr.argStringToArray(commandLine);
if (commandArgs.length === 0) {
throw new Error(`Parameter 'commandLine' cannot be null or empty.`);
}
// Path to tool to execute should be first arg
const toolPath = commandArgs[0];
args = commandArgs.slice(1).concat(args || []);
const runner = new tr.ToolRunner(toolPath, args, options);
return runner.exec();
});
}
exports.exec = exec;
/**
* Exec a command and get the output.
* Output will be streamed to the live console.
* Returns promise with the exit code and collected stdout and stderr
*
* @param commandLine command to execute (can include additional args). Must be correctly escaped.
* @param args optional arguments for tool. Escaping is handled by the lib.
* @param options optional exec options. See ExecOptions
* @returns Promise exit code, stdout, and stderr
*/
function getExecOutput(commandLine, args, options) {
var _a, _b;
return __awaiter(this, void 0, void 0, function* () {
let stdout = '';
let stderr = '';
//Using string decoder covers the case where a mult-byte character is split
const stdoutDecoder = new string_decoder_1.StringDecoder('utf8');
const stderrDecoder = new string_decoder_1.StringDecoder('utf8');
const originalStdoutListener = (_a = options === null || options === void 0 ? void 0 : options.listeners) === null || _a === void 0 ? void 0 : _a.stdout;
const originalStdErrListener = (_b = options === null || options === void 0 ? void 0 : options.listeners) === null || _b === void 0 ? void 0 : _b.stderr;
const stdErrListener = (data) => {
stderr += stderrDecoder.write(data);
if (originalStdErrListener) {
originalStdErrListener(data);
}
};
const stdOutListener = (data) => {
stdout += stdoutDecoder.write(data);
if (originalStdoutListener) {
originalStdoutListener(data);
}
};
const listeners = Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.listeners), { stdout: stdOutListener, stderr: stdErrListener });
const exitCode = yield exec(commandLine, args, Object.assign(Object.assign({}, options), { listeners }));
//flush any remaining characters
stdout += stdoutDecoder.end();
stderr += stderrDecoder.end();
return {
exitCode,
stdout,
stderr
};
});
}
exports.getExecOutput = getExecOutput;
//# sourceMappingURL=exec.js.map
/***/ }),
/***/ 88159:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.argStringToArray = exports.ToolRunner = void 0;
const os = __importStar(__nccwpck_require__(22037));
const events = __importStar(__nccwpck_require__(82361));
const child = __importStar(__nccwpck_require__(32081));
const path = __importStar(__nccwpck_require__(71017));
const io = __importStar(__nccwpck_require__(47351));
const ioUtil = __importStar(__nccwpck_require__(81962));
const timers_1 = __nccwpck_require__(39512);
/* eslint-disable @typescript-eslint/unbound-method */
const IS_WINDOWS = process.platform === 'win32';
/*
* Class for running command line tools. Handles quoting and arg parsing in a platform agnostic way.
*/
class ToolRunner extends events.EventEmitter {
constructor(toolPath, args, options) {
super();
if (!toolPath) {
throw new Error("Parameter 'toolPath' cannot be null or empty.");
}
this.toolPath = toolPath;
this.args = args || [];
this.options = options || {};
}
_debug(message) {
if (this.options.listeners && this.options.listeners.debug) {
this.options.listeners.debug(message);
}
}
_getCommandString(options, noPrefix) {
const toolPath = this._getSpawnFileName();
const args = this._getSpawnArgs(options);
let cmd = noPrefix ? '' : '[command]'; // omit prefix when piped to a second tool
if (IS_WINDOWS) {
// Windows + cmd file
if (this._isCmdFile()) {
cmd += toolPath;
for (const a of args) {
cmd += ` ${a}`;
}
}
// Windows + verbatim
else if (options.windowsVerbatimArguments) {
cmd += `"${toolPath}"`;
for (const a of args) {
cmd += ` ${a}`;
}
}
// Windows (regular)
else {
cmd += this._windowsQuoteCmdArg(toolPath);
for (const a of args) {
cmd += ` ${this._windowsQuoteCmdArg(a)}`;
}
}
}
else {
// OSX/Linux - this can likely be improved with some form of quoting.
// creating processes on Unix is fundamentally different than Windows.
// on Unix, execvp() takes an arg array.
cmd += toolPath;
for (const a of args) {
cmd += ` ${a}`;
}
}
return cmd;
}
_processLineBuffer(data, strBuffer, onLine) {
try {
let s = strBuffer + data.toString();
let n = s.indexOf(os.EOL);
while (n > -1) {
const line = s.substring(0, n);
onLine(line);
// the rest of the string ...
s = s.substring(n + os.EOL.length);
n = s.indexOf(os.EOL);
}
return s;
}
catch (err) {
// streaming lines to console is best effort. Don't fail a build.
this._debug(`error processing line. Failed with error ${err}`);
return '';
}
}
_getSpawnFileName() {
if (IS_WINDOWS) {
if (this._isCmdFile()) {
return process.env['COMSPEC'] || 'cmd.exe';
}
}
return this.toolPath;
}
_getSpawnArgs(options) {
if (IS_WINDOWS) {
if (this._isCmdFile()) {
let argline = `/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`;
for (const a of this.args) {
argline += ' ';
argline += options.windowsVerbatimArguments
? a
: this._windowsQuoteCmdArg(a);
}
argline += '"';
return [argline];
}
}
return this.args;
}
_endsWith(str, end) {
return str.endsWith(end);
}
_isCmdFile() {
const upperToolPath = this.toolPath.toUpperCase();
return (this._endsWith(upperToolPath, '.CMD') ||
this._endsWith(upperToolPath, '.BAT'));
}
_windowsQuoteCmdArg(arg) {
// for .exe, apply the normal quoting rules that libuv applies
if (!this._isCmdFile()) {
return this._uvQuoteCmdArg(arg);
}
// otherwise apply quoting rules specific to the cmd.exe command line parser.
// the libuv rules are generic and are not designed specifically for cmd.exe
// command line parser.
//
// for a detailed description of the cmd.exe command line parser, refer to
// http://stackoverflow.com/questions/4094699/how-does-the-windows-command-interpreter-cmd-exe-parse-scripts/7970912#7970912
// need quotes for empty arg
if (!arg) {
return '""';
}
// determine whether the arg needs to be quoted
const cmdSpecialChars = [
' ',
'\t',
'&',
'(',
')',
'[',
']',
'{',
'}',
'^',
'=',
';',
'!',
"'",
'+',
',',
'`',
'~',
'|',
'<',
'>',
'"'
];
let needsQuotes = false;
for (const char of arg) {
if (cmdSpecialChars.some(x => x === char)) {
needsQuotes = true;
break;
}
}
// short-circuit if quotes not needed
if (!needsQuotes) {
return arg;
}
// the following quoting rules are very similar to the rules that by libuv applies.
//
// 1) wrap the string in quotes
//
// 2) double-up quotes - i.e. " => ""
//
// this is different from the libuv quoting rules. libuv replaces " with \", which unfortunately
// doesn't work well with a cmd.exe command line.
//
// note, replacing " with "" also works well if the arg is passed to a downstream .NET console app.
// for example, the command line:
// foo.exe "myarg:""my val"""
// is parsed by a .NET console app into an arg array:
// [ "myarg:\"my val\"" ]
// which is the same end result when applying libuv quoting rules. although the actual
// command line from libuv quoting rules would look like:
// foo.exe "myarg:\"my val\""
//
// 3) double-up slashes that precede a quote,
// e.g. hello \world => "hello \world"
// hello\"world => "hello\\""world"
// hello\\"world => "hello\\\\""world"
// hello world\ => "hello world\\"
//
// technically this is not required for a cmd.exe command line, or the batch argument parser.
// the reasons for including this as a .cmd quoting rule are:
//
// a) this is optimized for the scenario where the argument is passed from the .cmd file to an
// external program. many programs (e.g. .NET console apps) rely on the slash-doubling rule.
//
// b) it's what we've been doing previously (by deferring to node default behavior) and we
// haven't heard any complaints about that aspect.
//
// note, a weakness of the quoting rules chosen here, is that % is not escaped. in fact, % cannot be
// escaped when used on the command line directly - even though within a .cmd file % can be escaped
// by using %%.
//
// the saving grace is, on the command line, %var% is left as-is if var is not defined. this contrasts
// the line parsing rules within a .cmd file, where if var is not defined it is replaced with nothing.
//
// one option that was explored was replacing % with ^% - i.e. %var% => ^%var^%. this hack would
// often work, since it is unlikely that var^ would exist, and the ^ character is removed when the
// variable is used. the problem, however, is that ^ is not removed when %* is used to pass the args
// to an external program.
//
// an unexplored potential solution for the % escaping problem, is to create a wrapper .cmd file.
// % can be escaped within a .cmd file.
let reverse = '"';
let quoteHit = true;
for (let i = arg.length; i > 0; i--) {
// walk the string in reverse
reverse += arg[i - 1];
if (quoteHit && arg[i - 1] === '\\') {
reverse += '\\'; // double the slash
}
else if (arg[i - 1] === '"') {
quoteHit = true;
reverse += '"'; // double the quote
}
else {
quoteHit = false;
}
}
reverse += '"';
return reverse
.split('')
.reverse()
.join('');
}
_uvQuoteCmdArg(arg) {
// Tool runner wraps child_process.spawn() and needs to apply the same quoting as
// Node in certain cases where the undocumented spawn option windowsVerbatimArguments
// is used.
//
// Since this function is a port of quote_cmd_arg from Node 4.x (technically, lib UV,
// see https://github.com/nodejs/node/blob/v4.x/deps/uv/src/win/process.c for details),
// pasting copyright notice from Node within this function:
//
// Copyright Joyent, Inc. and other Node contributors. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to
// deal in the Software without restriction, including without limitation the
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
// sell copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
if (!arg) {
// Need double quotation for empty argument
return '""';
}
if (!arg.includes(' ') && !arg.includes('\t') && !arg.includes('"')) {
// No quotation needed
return arg;
}
if (!arg.includes('"') && !arg.includes('\\')) {
// No embedded double quotes or backslashes, so I can just wrap
// quote marks around the whole thing.
return `"${arg}"`;
}
// Expected input/output:
// input : hello"world
// output: "hello\"world"
// input : hello""world
// output: "hello\"\"world"
// input : hello\world
// output: hello\world
// input : hello\\world
// output: hello\\world
// input : hello\"world
// output: "hello\\\"world"
// input : hello\\"world
// output: "hello\\\\\"world"
// input : hello world\
// output: "hello world\\" - note the comment in libuv actually reads "hello world\"
// but it appears the comment is wrong, it should be "hello world\\"
let reverse = '"';
let quoteHit = true;
for (let i = arg.length; i > 0; i--) {
// walk the string in reverse
reverse += arg[i - 1];
if (quoteHit && arg[i - 1] === '\\') {
reverse += '\\';
}
else if (arg[i - 1] === '"') {
quoteHit = true;
reverse += '\\';
}
else {
quoteHit = false;
}
}
reverse += '"';
return reverse
.split('')
.reverse()
.join('');
}
_cloneExecOptions(options) {
options = options || {};
const result = {
cwd: options.cwd || process.cwd(),
env: options.env || process.env,
silent: options.silent || false,
windowsVerbatimArguments: options.windowsVerbatimArguments || false,
failOnStdErr: options.failOnStdErr || false,
ignoreReturnCode: options.ignoreReturnCode || false,
delay: options.delay || 10000
};
result.outStream = options.outStream || process.stdout;
result.errStream = options.errStream || process.stderr;
return result;
}
_getSpawnOptions(options, toolPath) {
options = options || {};
const result = {};
result.cwd = options.cwd;
result.env = options.env;
result['windowsVerbatimArguments'] =
options.windowsVerbatimArguments || this._isCmdFile();
if (options.windowsVerbatimArguments) {
result.argv0 = `"${toolPath}"`;
}
return result;
}
/**
* Exec a tool.
* Output will be streamed to the live console.
* Returns promise with return code
*
* @param tool path to tool to exec
* @param options optional exec options. See ExecOptions
* @returns number
*/
exec() {
return __awaiter(this, void 0, void 0, function* () {
// root the tool path if it is unrooted and contains relative pathing
if (!ioUtil.isRooted(this.toolPath) &&
(this.toolPath.includes('/') ||
(IS_WINDOWS && this.toolPath.includes('\\')))) {
// prefer options.cwd if it is specified, however options.cwd may also need to be rooted
this.toolPath = path.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath);
}
// if the tool is only a file name, then resolve it from the PATH
// otherwise verify it exists (add extension on Windows if necessary)
this.toolPath = yield io.which(this.toolPath, true);
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
this._debug(`exec tool: ${this.toolPath}`);
this._debug('arguments:');
for (const arg of this.args) {
this._debug(` ${arg}`);
}
const optionsNonNull = this._cloneExecOptions(this.options);
if (!optionsNonNull.silent && optionsNonNull.outStream) {
optionsNonNull.outStream.write(this._getCommandString(optionsNonNull) + os.EOL);
}
const state = new ExecState(optionsNonNull, this.toolPath);
state.on('debug', (message) => {
this._debug(message);
});
if (this.options.cwd && !(yield ioUtil.exists(this.options.cwd))) {
return reject(new Error(`The cwd: ${this.options.cwd} does not exist!`));
}
const fileName = this._getSpawnFileName();
const cp = child.spawn(fileName, this._getSpawnArgs(optionsNonNull), this._getSpawnOptions(this.options, fileName));
let stdbuffer = '';
if (cp.stdout) {
cp.stdout.on('data', (data) => {
if (this.options.listeners && this.options.listeners.stdout) {
this.options.listeners.stdout(data);
}
if (!optionsNonNull.silent && optionsNonNull.outStream) {
optionsNonNull.outStream.write(data);
}
stdbuffer = this._processLineBuffer(data, stdbuffer, (line) => {
if (this.options.listeners && this.options.listeners.stdline) {
this.options.listeners.stdline(line);
}
});
});
}
let errbuffer = '';
if (cp.stderr) {
cp.stderr.on('data', (data) => {
state.processStderr = true;
if (this.options.listeners && this.options.listeners.stderr) {
this.options.listeners.stderr(data);
}
if (!optionsNonNull.silent &&
optionsNonNull.errStream &&
optionsNonNull.outStream) {
const s = optionsNonNull.failOnStdErr
? optionsNonNull.errStream
: optionsNonNull.outStream;
s.write(data);
}
errbuffer = this._processLineBuffer(data, errbuffer, (line) => {
if (this.options.listeners && this.options.listeners.errline) {
this.options.listeners.errline(line);
}
});
});
}
cp.on('error', (err) => {
state.processError = err.message;
state.processExited = true;
state.processClosed = true;
state.CheckComplete();
});
cp.on('exit', (code) => {
state.processExitCode = code;
state.processExited = true;
this._debug(`Exit code ${code} received from tool '${this.toolPath}'`);
state.CheckComplete();
});
cp.on('close', (code) => {
state.processExitCode = code;
state.processExited = true;
state.processClosed = true;
this._debug(`STDIO streams have closed for tool '${this.toolPath}'`);
state.CheckComplete();
});
state.on('done', (error, exitCode) => {
if (stdbuffer.length > 0) {
this.emit('stdline', stdbuffer);
}
if (errbuffer.length > 0) {
this.emit('errline', errbuffer);
}
cp.removeAllListeners();
if (error) {
reject(error);
}
else {
resolve(exitCode);
}
});
if (this.options.input) {
if (!cp.stdin) {
throw new Error('child process missing stdin');
}
cp.stdin.end(this.options.input);
}
}));
});
}
}
exports.ToolRunner = ToolRunner;
/**
* Convert an arg string to an array of args. Handles escaping
*
* @param argString string of arguments
* @returns string[] array of arguments
*/
function argStringToArray(argString) {
const args = [];
let inQuotes = false;
let escaped = false;
let arg = '';
function append(c) {
// we only escape double quotes.
if (escaped && c !== '"') {
arg += '\\';
}
arg += c;
escaped = false;
}
for (let i = 0; i < argString.length; i++) {
const c = argString.charAt(i);
if (c === '"') {
if (!escaped) {
inQuotes = !inQuotes;
}
else {
append(c);
}
continue;
}
if (c === '\\' && escaped) {
append(c);
continue;
}
if (c === '\\' && inQuotes) {
escaped = true;
continue;
}
if (c === ' ' && !inQuotes) {
if (arg.length > 0) {
args.push(arg);
arg = '';
}
continue;
}
append(c);
}
if (arg.length > 0) {
args.push(arg.trim());
}
return args;
}
exports.argStringToArray = argStringToArray;
class ExecState extends events.EventEmitter {
constructor(options, toolPath) {
super();
this.processClosed = false; // tracks whether the process has exited and stdio is closed
this.processError = '';
this.processExitCode = 0;
this.processExited = false; // tracks whether the process has exited
this.processStderr = false; // tracks whether stderr was written to
this.delay = 10000; // 10 seconds
this.done = false;
this.timeout = null;
if (!toolPath) {
throw new Error('toolPath must not be empty');
}
this.options = options;
this.toolPath = toolPath;
if (options.delay) {
this.delay = options.delay;
}
}
CheckComplete() {
if (this.done) {
return;
}
if (this.processClosed) {
this._setResult();
}
else if (this.processExited) {
this.timeout = timers_1.setTimeout(ExecState.HandleTimeout, this.delay, this);
}
}
_debug(message) {
this.emit('debug', message);
}
_setResult() {
// determine whether there is an error
let error;
if (this.processExited) {
if (this.processError) {
error = new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`);
}
else if (this.processExitCode !== 0 && !this.options.ignoreReturnCode) {
error = new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`);
}
else if (this.processStderr && this.options.failOnStdErr) {
error = new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`);
}
}
// clear the timeout
if (this.timeout) {
clearTimeout(this.timeout);
this.timeout = null;
}
this.done = true;
this.emit('done', error, this.processExitCode);
}
static HandleTimeout(state) {
if (state.done) {
return;
}
if (!state.processClosed && state.processExited) {
const message = `The STDIO streams did not close within ${state.delay /
1000} seconds of the exit event from process '${state.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`;
state._debug(message);
}
state._setResult();
}
}
//# sourceMappingURL=toolrunner.js.map
/***/ }),
/***/ 23702:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
class BasicCredentialHandler {
constructor(username, password) {
this.username = username;
this.password = password;
}
prepareRequest(options) {
options.headers['Authorization'] =
'Basic ' +
Buffer.from(this.username + ':' + this.password).toString('base64');
}
// This handler cannot handle 401
canHandleAuthentication(response) {
return false;
}
handleAuthentication(httpClient, requestInfo, objs) {
return null;
}
}
exports.BasicCredentialHandler = BasicCredentialHandler;
class BearerCredentialHandler {
constructor(token) {
this.token = token;
}
// currently implements pre-authorization
// TODO: support preAuth = false where it hooks on 401
prepareRequest(options) {
options.headers['Authorization'] = 'Bearer ' + this.token;
}
// This handler cannot handle 401
canHandleAuthentication(response) {
return false;
}
handleAuthentication(httpClient, requestInfo, objs) {
return null;
}
}
exports.BearerCredentialHandler = BearerCredentialHandler;
class PersonalAccessTokenCredentialHandler {
constructor(token) {
this.token = token;
}
// currently implements pre-authorization
// TODO: support preAuth = false where it hooks on 401
prepareRequest(options) {
options.headers['Authorization'] =
'Basic ' + Buffer.from('PAT:' + this.token).toString('base64');
}
// This handler cannot handle 401
canHandleAuthentication(response) {
return false;
}
handleAuthentication(httpClient, requestInfo, objs) {
return null;
}
}
exports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler;
/***/ }),
/***/ 39925:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
const http = __nccwpck_require__(13685);
const https = __nccwpck_require__(95687);
const pm = __nccwpck_require__(16443);
let tunnel;
var HttpCodes;
(function (HttpCodes) {
HttpCodes[HttpCodes["OK"] = 200] = "OK";
HttpCodes[HttpCodes["MultipleChoices"] = 300] = "MultipleChoices";
HttpCodes[HttpCodes["MovedPermanently"] = 301] = "MovedPermanently";
HttpCodes[HttpCodes["ResourceMoved"] = 302] = "ResourceMoved";
HttpCodes[HttpCodes["SeeOther"] = 303] = "SeeOther";
HttpCodes[HttpCodes["NotModified"] = 304] = "NotModified";
HttpCodes[HttpCodes["UseProxy"] = 305] = "UseProxy";
HttpCodes[HttpCodes["SwitchProxy"] = 306] = "SwitchProxy";
HttpCodes[HttpCodes["TemporaryRedirect"] = 307] = "TemporaryRedirect";
HttpCodes[HttpCodes["PermanentRedirect"] = 308] = "PermanentRedirect";
HttpCodes[HttpCodes["BadRequest"] = 400] = "BadRequest";
HttpCodes[HttpCodes["Unauthorized"] = 401] = "Unauthorized";
HttpCodes[HttpCodes["PaymentRequired"] = 402] = "PaymentRequired";
HttpCodes[HttpCodes["Forbidden"] = 403] = "Forbidden";
HttpCodes[HttpCodes["NotFound"] = 404] = "NotFound";
HttpCodes[HttpCodes["MethodNotAllowed"] = 405] = "MethodNotAllowed";
HttpCodes[HttpCodes["NotAcceptable"] = 406] = "NotAcceptable";
HttpCodes[HttpCodes["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired";
HttpCodes[HttpCodes["RequestTimeout"] = 408] = "RequestTimeout";
HttpCodes[HttpCodes["Conflict"] = 409] = "Conflict";
HttpCodes[HttpCodes["Gone"] = 410] = "Gone";
HttpCodes[HttpCodes["TooManyRequests"] = 429] = "TooManyRequests";
HttpCodes[HttpCodes["InternalServerError"] = 500] = "InternalServerError";
HttpCodes[HttpCodes["NotImplemented"] = 501] = "NotImplemented";
HttpCodes[HttpCodes["BadGateway"] = 502] = "BadGateway";
HttpCodes[HttpCodes["ServiceUnavailable"] = 503] = "ServiceUnavailable";
HttpCodes[HttpCodes["GatewayTimeout"] = 504] = "GatewayTimeout";
})(HttpCodes = exports.HttpCodes || (exports.HttpCodes = {}));
var Headers;
(function (Headers) {
Headers["Accept"] = "accept";
Headers["ContentType"] = "content-type";
})(Headers = exports.Headers || (exports.Headers = {}));
var MediaTypes;
(function (MediaTypes) {
MediaTypes["ApplicationJson"] = "application/json";
})(MediaTypes = exports.MediaTypes || (exports.MediaTypes = {}));
/**
* Returns the proxy URL, depending upon the supplied url and proxy environment variables.
* @param serverUrl The server URL where the request will be sent. For example, https://api.github.com
*/
function getProxyUrl(serverUrl) {
let proxyUrl = pm.getProxyUrl(new URL(serverUrl));
return proxyUrl ? proxyUrl.href : '';
}
exports.getProxyUrl = getProxyUrl;
const HttpRedirectCodes = [
HttpCodes.MovedPermanently,
HttpCodes.ResourceMoved,
HttpCodes.SeeOther,
HttpCodes.TemporaryRedirect,
HttpCodes.PermanentRedirect
];
const HttpResponseRetryCodes = [
HttpCodes.BadGateway,
HttpCodes.ServiceUnavailable,
HttpCodes.GatewayTimeout
];
const RetryableHttpVerbs = ['OPTIONS', 'GET', 'DELETE', 'HEAD'];
const ExponentialBackoffCeiling = 10;
const ExponentialBackoffTimeSlice = 5;
class HttpClientError extends Error {
constructor(message, statusCode) {
super(message);
this.name = 'HttpClientError';
this.statusCode = statusCode;
Object.setPrototypeOf(this, HttpClientError.prototype);
}
}
exports.HttpClientError = HttpClientError;
class HttpClientResponse {
constructor(message) {
this.message = message;
}
readBody() {
return new Promise(async (resolve, reject) => {
let output = Buffer.alloc(0);
this.message.on('data', (chunk) => {
output = Buffer.concat([output, chunk]);
});
this.message.on('end', () => {
resolve(output.toString());
});
});
}
}
exports.HttpClientResponse = HttpClientResponse;
function isHttps(requestUrl) {
let parsedUrl = new URL(requestUrl);
return parsedUrl.protocol === 'https:';
}
exports.isHttps = isHttps;
class HttpClient {
constructor(userAgent, handlers, requestOptions) {
this._ignoreSslError = false;
this._allowRedirects = true;
this._allowRedirectDowngrade = false;
this._maxRedirects = 50;
this._allowRetries = false;
this._maxRetries = 1;
this._keepAlive = false;
this._disposed = false;
this.userAgent = userAgent;
this.handlers = handlers || [];
this.requestOptions = requestOptions;
if (requestOptions) {
if (requestOptions.ignoreSslError != null) {
this._ignoreSslError = requestOptions.ignoreSslError;
}
this._socketTimeout = requestOptions.socketTimeout;
if (requestOptions.allowRedirects != null) {
this._allowRedirects = requestOptions.allowRedirects;
}
if (requestOptions.allowRedirectDowngrade != null) {
this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade;
}
if (requestOptions.maxRedirects != null) {
this._maxRedirects = Math.max(requestOptions.maxRedirects, 0);
}
if (requestOptions.keepAlive != null) {
this._keepAlive = requestOptions.keepAlive;
}
if (requestOptions.allowRetries != null) {
this._allowRetries = requestOptions.allowRetries;
}
if (requestOptions.maxRetries != null) {
this._maxRetries = requestOptions.maxRetries;
}
}
}
options(requestUrl, additionalHeaders) {
return this.request('OPTIONS', requestUrl, null, additionalHeaders || {});
}
get(requestUrl, additionalHeaders) {
return this.request('GET', requestUrl, null, additionalHeaders || {});
}
del(requestUrl, additionalHeaders) {
return this.request('DELETE', requestUrl, null, additionalHeaders || {});
}
post(requestUrl, data, additionalHeaders) {
return this.request('POST', requestUrl, data, additionalHeaders || {});
}
patch(requestUrl, data, additionalHeaders) {
return this.request('PATCH', requestUrl, data, additionalHeaders || {});
}
put(requestUrl, data, additionalHeaders) {
return this.request('PUT', requestUrl, data, additionalHeaders || {});
}
head(requestUrl, additionalHeaders) {
return this.request('HEAD', requestUrl, null, additionalHeaders || {});
}
sendStream(verb, requestUrl, stream, additionalHeaders) {
return this.request(verb, requestUrl, stream, additionalHeaders);
}
/**
* Gets a typed object from an endpoint
* Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise
*/
async getJson(requestUrl, additionalHeaders = {}) {
additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);
let res = await this.get(requestUrl, additionalHeaders);
return this._processResponse(res, this.requestOptions);
}
async postJson(requestUrl, obj, additionalHeaders = {}) {
let data = JSON.stringify(obj, null, 2);
additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);
additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson);
let res = await this.post(requestUrl, data, additionalHeaders);
return this._processResponse(res, this.requestOptions);
}
async putJson(requestUrl, obj, additionalHeaders = {}) {
let data = JSON.stringify(obj, null, 2);
additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);
additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson);
let res = await this.put(requestUrl, data, additionalHeaders);
return this._processResponse(res, this.requestOptions);
}
async patchJson(requestUrl, obj, additionalHeaders = {}) {
let data = JSON.stringify(obj, null, 2);
additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);
additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson);
let res = await this.patch(requestUrl, data, additionalHeaders);
return this._processResponse(res, this.requestOptions);
}
/**
* Makes a raw http request.
* All other methods such as get, post, patch, and request ultimately call this.
* Prefer get, del, post and patch
*/
async request(verb, requestUrl, data, headers) {
if (this._disposed) {
throw new Error('Client has already been disposed.');
}
let parsedUrl = new URL(requestUrl);
let info = this._prepareRequest(verb, parsedUrl, headers);
// Only perform retries on reads since writes may not be idempotent.
let maxTries = this._allowRetries && RetryableHttpVerbs.indexOf(verb) != -1
? this._maxRetries + 1
: 1;
let numTries = 0;
let response;
while (numTries < maxTries) {
response = await this.requestRaw(info, data);
// Check if it's an authentication challenge
if (response &&
response.message &&
response.message.statusCode === HttpCodes.Unauthorized) {
let authenticationHandler;
for (let i = 0; i < this.handlers.length; i++) {
if (this.handlers[i].canHandleAuthentication(response)) {
authenticationHandler = this.handlers[i];
break;
}
}
if (authenticationHandler) {
return authenticationHandler.handleAuthentication(this, info, data);
}
else {
// We have received an unauthorized response but have no handlers to handle it.
// Let the response return to the caller.
return response;
}
}
let redirectsRemaining = this._maxRedirects;
while (HttpRedirectCodes.indexOf(response.message.statusCode) != -1 &&
this._allowRedirects &&
redirectsRemaining > 0) {
const redirectUrl = response.message.headers['location'];
if (!redirectUrl) {
// if there's no location to redirect to, we won't
break;
}
let parsedRedirectUrl = new URL(redirectUrl);
if (parsedUrl.protocol == 'https:' &&
parsedUrl.protocol != parsedRedirectUrl.protocol &&
!this._allowRedirectDowngrade) {
throw new Error('Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.');
}
// we need to finish reading the response before reassigning response
// which will leak the open socket.
await response.readBody();
// strip authorization header if redirected to a different hostname
if (parsedRedirectUrl.hostname !== parsedUrl.hostname) {
for (let header in headers) {
// header names are case insensitive
if (header.toLowerCase() === 'authorization') {
delete headers[header];
}
}
}
// let's make the request with the new redirectUrl
info = this._prepareRequest(verb, parsedRedirectUrl, headers);
response = await this.requestRaw(info, data);
redirectsRemaining--;
}
if (HttpResponseRetryCodes.indexOf(response.message.statusCode) == -1) {
// If not a retry code, return immediately instead of retrying
return response;
}
numTries += 1;
if (numTries < maxTries) {
await response.readBody();
await this._performExponentialBackoff(numTries);
}
}
return response;
}
/**
* Needs to be called if keepAlive is set to true in request options.
*/
dispose() {
if (this._agent) {
this._agent.destroy();
}
this._disposed = true;
}
/**
* Raw request.
* @param info
* @param data
*/
requestRaw(info, data) {
return new Promise((resolve, reject) => {
let callbackForResult = function (err, res) {
if (err) {
reject(err);
}
resolve(res);
};
this.requestRawWithCallback(info, data, callbackForResult);
});
}
/**
* Raw request with callback.
* @param info
* @param data
* @param onResult
*/
requestRawWithCallback(info, data, onResult) {
let socket;
if (typeof data === 'string') {
info.options.headers['Content-Length'] = Buffer.byteLength(data, 'utf8');
}
let callbackCalled = false;
let handleResult = (err, res) => {
if (!callbackCalled) {
callbackCalled = true;
onResult(err, res);
}
};
let req = info.httpModule.request(info.options, (msg) => {
let res = new HttpClientResponse(msg);
handleResult(null, res);
});
req.on('socket', sock => {
socket = sock;
});
// If we ever get disconnected, we want the socket to timeout eventually
req.setTimeout(this._socketTimeout || 3 * 60000, () => {
if (socket) {
socket.end();
}
handleResult(new Error('Request timeout: ' + info.options.path), null);
});
req.on('error', function (err) {
// err has statusCode property
// res should have headers
handleResult(err, null);
});
if (data && typeof data === 'string') {
req.write(data, 'utf8');
}
if (data && typeof data !== 'string') {
data.on('close', function () {
req.end();
});
data.pipe(req);
}
else {
req.end();
}
}
/**
* Gets an http agent. This function is useful when you need an http agent that handles
* routing through a proxy server - depending upon the url and proxy environment variables.
* @param serverUrl The server URL where the request will be sent. For example, https://api.github.com
*/
getAgent(serverUrl) {
let parsedUrl = new URL(serverUrl);
return this._getAgent(parsedUrl);
}
_prepareRequest(method, requestUrl, headers) {
const info = {};
info.parsedUrl = requestUrl;
const usingSsl = info.parsedUrl.protocol === 'https:';
info.httpModule = usingSsl ? https : http;
const defaultPort = usingSsl ? 443 : 80;
info.options = {};
info.options.host = info.parsedUrl.hostname;
info.options.port = info.parsedUrl.port
? parseInt(info.parsedUrl.port)
: defaultPort;
info.options.path =
(info.parsedUrl.pathname || '') + (info.parsedUrl.search || '');
info.options.method = method;
info.options.headers = this._mergeHeaders(headers);
if (this.userAgent != null) {
info.options.headers['user-agent'] = this.userAgent;
}
info.options.agent = this._getAgent(info.parsedUrl);
// gives handlers an opportunity to participate
if (this.handlers) {
this.handlers.forEach(handler => {
handler.prepareRequest(info.options);
});
}
return info;
}
_mergeHeaders(headers) {
const lowercaseKeys = obj => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCase()] = obj[k]), c), {});
if (this.requestOptions && this.requestOptions.headers) {
return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers));
}
return lowercaseKeys(headers || {});
}
_getExistingOrDefaultHeader(additionalHeaders, header, _default) {
const lowercaseKeys = obj => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCase()] = obj[k]), c), {});
let clientHeader;
if (this.requestOptions && this.requestOptions.headers) {
clientHeader = lowercaseKeys(this.requestOptions.headers)[header];
}
return additionalHeaders[header] || clientHeader || _default;
}
_getAgent(parsedUrl) {
let agent;
let proxyUrl = pm.getProxyUrl(parsedUrl);
let useProxy = proxyUrl && proxyUrl.hostname;
if (this._keepAlive && useProxy) {
agent = this._proxyAgent;
}
if (this._keepAlive && !useProxy) {
agent = this._agent;
}
// if agent is already assigned use that agent.
if (!!agent) {
return agent;
}
const usingSsl = parsedUrl.protocol === 'https:';
let maxSockets = 100;
if (!!this.requestOptions) {
maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets;
}
if (useProxy) {
// If using proxy, need tunnel
if (!tunnel) {
tunnel = __nccwpck_require__(74294);
}
const agentOptions = {
maxSockets: maxSockets,
keepAlive: this._keepAlive,
proxy: {
...((proxyUrl.username || proxyUrl.password) && {
proxyAuth: `${proxyUrl.username}:${proxyUrl.password}`
}),
host: proxyUrl.hostname,
port: proxyUrl.port
}
};
let tunnelAgent;
const overHttps = proxyUrl.protocol === 'https:';
if (usingSsl) {
tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp;
}
else {
tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp;
}
agent = tunnelAgent(agentOptions);
this._proxyAgent = agent;
}
// if reusing agent across request and tunneling agent isn't assigned create a new agent
if (this._keepAlive && !agent) {
const options = { keepAlive: this._keepAlive, maxSockets: maxSockets };
agent = usingSsl ? new https.Agent(options) : new http.Agent(options);
this._agent = agent;
}
// if not using private agent and tunnel agent isn't setup then use global agent
if (!agent) {
agent = usingSsl ? https.globalAgent : http.globalAgent;
}
if (usingSsl && this._ignoreSslError) {
// we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process
// http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options
// we have to cast it to any and change it directly
agent.options = Object.assign(agent.options || {}, {
rejectUnauthorized: false
});
}
return agent;
}
_performExponentialBackoff(retryNumber) {
retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber);
const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber);
return new Promise(resolve => setTimeout(() => resolve(), ms));
}
static dateTimeDeserializer(key, value) {
if (typeof value === 'string') {
let a = new Date(value);
if (!isNaN(a.valueOf())) {
return a;
}
}
return value;
}
async _processResponse(res, options) {
return new Promise(async (resolve, reject) => {
const statusCode = res.message.statusCode;
const response = {
statusCode: statusCode,
result: null,
headers: {}
};
// not found leads to null obj returned
if (statusCode == HttpCodes.NotFound) {
resolve(response);
}
let obj;
let contents;
// get the result from the body
try {
contents = await res.readBody();
if (contents && contents.length > 0) {
if (options && options.deserializeDates) {
obj = JSON.parse(contents, HttpClient.dateTimeDeserializer);
}
else {
obj = JSON.parse(contents);
}
response.result = obj;
}
response.headers = res.message.headers;
}
catch (err) {
// Invalid resource (contents not json); leaving result obj null
}
// note that 3xx redirects are handled by the http layer.
if (statusCode > 299) {
let msg;
// if exception/error in body, attempt to get better error
if (obj && obj.message) {
msg = obj.message;
}
else if (contents && contents.length > 0) {
// it may be the case that the exception is in the body message as string
msg = contents;
}
else {
msg = 'Failed request: (' + statusCode + ')';
}
let err = new HttpClientError(msg, statusCode);
err.result = response.result;
reject(err);
}
else {
resolve(response);
}
});
}
}
exports.HttpClient = HttpClient;
/***/ }),
/***/ 16443:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
function getProxyUrl(reqUrl) {
let usingSsl = reqUrl.protocol === 'https:';
let proxyUrl;
if (checkBypass(reqUrl)) {
return proxyUrl;
}
let proxyVar;
if (usingSsl) {
proxyVar = process.env['https_proxy'] || process.env['HTTPS_PROXY'];
}
else {
proxyVar = process.env['http_proxy'] || process.env['HTTP_PROXY'];
}
if (proxyVar) {
proxyUrl = new URL(proxyVar);
}
return proxyUrl;
}
exports.getProxyUrl = getProxyUrl;
function checkBypass(reqUrl) {
if (!reqUrl.hostname) {
return false;
}
let noProxy = process.env['no_proxy'] || process.env['NO_PROXY'] || '';
if (!noProxy) {
return false;
}
// Determine the request port
let reqPort;
if (reqUrl.port) {
reqPort = Number(reqUrl.port);
}
else if (reqUrl.protocol === 'http:') {
reqPort = 80;
}
else if (reqUrl.protocol === 'https:') {
reqPort = 443;
}
// Format the request hostname and hostname with port
let upperReqHosts = [reqUrl.hostname.toUpperCase()];
if (typeof reqPort === 'number') {
upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`);
}
// Compare request host against noproxy
for (let upperNoProxyItem of noProxy
.split(',')
.map(x => x.trim().toUpperCase())
.filter(x => x)) {
if (upperReqHosts.some(x => x === upperNoProxyItem)) {
return true;
}
}
return false;
}
exports.checkBypass = checkBypass;
/***/ }),
/***/ 81962:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
result["default"] = mod;
return result;
};
var _a;
Object.defineProperty(exports, "__esModule", ({ value: true }));
const assert_1 = __nccwpck_require__(39491);
const fs = __importStar(__nccwpck_require__(57147));
const path = __importStar(__nccwpck_require__(71017));
_a = fs.promises, exports.chmod = _a.chmod, exports.copyFile = _a.copyFile, exports.lstat = _a.lstat, exports.mkdir = _a.mkdir, exports.readdir = _a.readdir, exports.readlink = _a.readlink, exports.rename = _a.rename, exports.rmdir = _a.rmdir, exports.stat = _a.stat, exports.symlink = _a.symlink, exports.unlink = _a.unlink;
exports.IS_WINDOWS = process.platform === 'win32';
function exists(fsPath) {
return __awaiter(this, void 0, void 0, function* () {
try {
yield exports.stat(fsPath);
}
catch (err) {
if (err.code === 'ENOENT') {
return false;
}
throw err;
}
return true;
});
}
exports.exists = exists;
function isDirectory(fsPath, useStat = false) {
return __awaiter(this, void 0, void 0, function* () {
const stats = useStat ? yield exports.stat(fsPath) : yield exports.lstat(fsPath);
return stats.isDirectory();
});
}
exports.isDirectory = isDirectory;
/**
* On OSX/Linux, true if path starts with '/'. On Windows, true for paths like:
* \, \hello, \\hello\share, C:, and C:\hello (and corresponding alternate separator cases).
*/
function isRooted(p) {
p = normalizeSeparators(p);
if (!p) {
throw new Error('isRooted() parameter "p" cannot be empty');
}
if (exports.IS_WINDOWS) {
return (p.startsWith('\\') || /^[A-Z]:/i.test(p) // e.g. \ or \hello or \\hello
); // e.g. C: or C:\hello
}
return p.startsWith('/');
}
exports.isRooted = isRooted;
/**
* Recursively create a directory at `fsPath`.
*
* This implementation is optimistic, meaning it attempts to create the full
* path first, and backs up the path stack from there.
*
* @param fsPath The path to create
* @param maxDepth The maximum recursion depth
* @param depth The current recursion depth
*/
function mkdirP(fsPath, maxDepth = 1000, depth = 1) {
return __awaiter(this, void 0, void 0, function* () {
assert_1.ok(fsPath, 'a path argument must be provided');
fsPath = path.resolve(fsPath);
if (depth >= maxDepth)
return exports.mkdir(fsPath);
try {
yield exports.mkdir(fsPath);
return;
}
catch (err) {
switch (err.code) {
case 'ENOENT': {
yield mkdirP(path.dirname(fsPath), maxDepth, depth + 1);
yield exports.mkdir(fsPath);
return;
}
default: {
let stats;
try {
stats = yield exports.stat(fsPath);
}
catch (err2) {
throw err;
}
if (!stats.isDirectory())
throw err;
}
}
}
});
}
exports.mkdirP = mkdirP;
/**
* Best effort attempt to determine whether a file exists and is executable.
* @param filePath file path to check
* @param extensions additional file extensions to try
* @return if file exists and is executable, returns the file path. otherwise empty string.
*/
function tryGetExecutablePath(filePath, extensions) {
return __awaiter(this, void 0, void 0, function* () {
let stats = undefined;
try {
// test file exists
stats = yield exports.stat(filePath);
}
catch (err) {
if (err.code !== 'ENOENT') {
// eslint-disable-next-line no-console
console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`);
}
}
if (stats && stats.isFile()) {
if (exports.IS_WINDOWS) {
// on Windows, test for valid extension
const upperExt = path.extname(filePath).toUpperCase();
if (extensions.some(validExt => validExt.toUpperCase() === upperExt)) {
return filePath;
}
}
else {
if (isUnixExecutable(stats)) {
return filePath;
}
}
}
// try each extension
const originalFilePath = filePath;
for (const extension of extensions) {
filePath = originalFilePath + extension;
stats = undefined;
try {
stats = yield exports.stat(filePath);
}
catch (err) {
if (err.code !== 'ENOENT') {
// eslint-disable-next-line no-console
console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`);
}
}
if (stats && stats.isFile()) {
if (exports.IS_WINDOWS) {
// preserve the case of the actual file (since an extension was appended)
try {
const directory = path.dirname(filePath);
const upperName = path.basename(filePath).toUpperCase();
for (const actualName of yield exports.readdir(directory)) {
if (upperName === actualName.toUpperCase()) {
filePath = path.join(directory, actualName);
break;
}
}
}
catch (err) {
// eslint-disable-next-line no-console
console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`);
}
return filePath;
}
else {
if (isUnixExecutable(stats)) {
return filePath;
}
}
}
}
return '';
});
}
exports.tryGetExecutablePath = tryGetExecutablePath;
function normalizeSeparators(p) {
p = p || '';
if (exports.IS_WINDOWS) {
// convert slashes on Windows
p = p.replace(/\//g, '\\');
// remove redundant slashes
return p.replace(/\\\\+/g, '\\');
}
// remove redundant slashes
return p.replace(/\/\/+/g, '/');
}
// on Mac/Linux, test the execute bit
// R W X R W X R W X
// 256 128 64 32 16 8 4 2 1
function isUnixExecutable(stats) {
return ((stats.mode & 1) > 0 ||
((stats.mode & 8) > 0 && stats.gid === process.getgid()) ||
((stats.mode & 64) > 0 && stats.uid === process.getuid()));
}
//# sourceMappingURL=io-util.js.map
/***/ }),
/***/ 47351:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
result["default"] = mod;
return result;
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
const childProcess = __importStar(__nccwpck_require__(32081));
const path = __importStar(__nccwpck_require__(71017));
const util_1 = __nccwpck_require__(73837);
const ioUtil = __importStar(__nccwpck_require__(81962));
const exec = util_1.promisify(childProcess.exec);
/**
* Copies a file or folder.
* Based off of shelljs - https://github.com/shelljs/shelljs/blob/9237f66c52e5daa40458f94f9565e18e8132f5a6/src/cp.js
*
* @param source source path
* @param dest destination path
* @param options optional. See CopyOptions.
*/
function cp(source, dest, options = {}) {
return __awaiter(this, void 0, void 0, function* () {
const { force, recursive } = readCopyOptions(options);
const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null;
// Dest is an existing file, but not forcing
if (destStat && destStat.isFile() && !force) {
return;
}
// If dest is an existing directory, should copy inside.
const newDest = destStat && destStat.isDirectory()
? path.join(dest, path.basename(source))
: dest;
if (!(yield ioUtil.exists(source))) {
throw new Error(`no such file or directory: ${source}`);
}
const sourceStat = yield ioUtil.stat(source);
if (sourceStat.isDirectory()) {
if (!recursive) {
throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`);
}
else {
yield cpDirRecursive(source, newDest, 0, force);
}
}
else {
if (path.relative(source, newDest) === '') {
// a file cannot be copied to itself
throw new Error(`'${newDest}' and '${source}' are the same file`);
}
yield copyFile(source, newDest, force);
}
});
}
exports.cp = cp;
/**
* Moves a path.
*
* @param source source path
* @param dest destination path
* @param options optional. See MoveOptions.
*/
function mv(source, dest, options = {}) {
return __awaiter(this, void 0, void 0, function* () {
if (yield ioUtil.exists(dest)) {
let destExists = true;
if (yield ioUtil.isDirectory(dest)) {
// If dest is directory copy src into dest
dest = path.join(dest, path.basename(source));
destExists = yield ioUtil.exists(dest);
}
if (destExists) {
if (options.force == null || options.force) {
yield rmRF(dest);
}
else {
throw new Error('Destination already exists');
}
}
}
yield mkdirP(path.dirname(dest));
yield ioUtil.rename(source, dest);
});
}
exports.mv = mv;
/**
* Remove a path recursively with force
*
* @param inputPath path to remove
*/
function rmRF(inputPath) {
return __awaiter(this, void 0, void 0, function* () {
if (ioUtil.IS_WINDOWS) {
// Node doesn't provide a delete operation, only an unlink function. This means that if the file is being used by another
// program (e.g. antivirus), it won't be deleted. To address this, we shell out the work to rd/del.
try {
if (yield ioUtil.isDirectory(inputPath, true)) {
yield exec(`rd /s /q "${inputPath}"`);
}
else {
yield exec(`del /f /a "${inputPath}"`);
}
}
catch (err) {
// if you try to delete a file that doesn't exist, desired result is achieved
// other errors are valid
if (err.code !== 'ENOENT')
throw err;
}
// Shelling out fails to remove a symlink folder with missing source, this unlink catches that
try {
yield ioUtil.unlink(inputPath);
}
catch (err) {
// if you try to delete a file that doesn't exist, desired result is achieved
// other errors are valid
if (err.code !== 'ENOENT')
throw err;
}
}
else {
let isDir = false;
try {
isDir = yield ioUtil.isDirectory(inputPath);
}
catch (err) {
// if you try to delete a file that doesn't exist, desired result is achieved
// other errors are valid
if (err.code !== 'ENOENT')
throw err;
return;
}
if (isDir) {
yield exec(`rm -rf "${inputPath}"`);
}
else {
yield ioUtil.unlink(inputPath);
}
}
});
}
exports.rmRF = rmRF;
/**
* Make a directory. Creates the full path with folders in between
* Will throw if it fails
*
* @param fsPath path to create
* @returns Promise
*/
function mkdirP(fsPath) {
return __awaiter(this, void 0, void 0, function* () {
yield ioUtil.mkdirP(fsPath);
});
}
exports.mkdirP = mkdirP;
/**
* Returns path of a tool had the tool actually been invoked. Resolves via paths.
* If you check and the tool does not exist, it will throw.
*
* @param tool name of the tool
* @param check whether to check if tool exists
* @returns Promise path to tool
*/
function which(tool, check) {
return __awaiter(this, void 0, void 0, function* () {
if (!tool) {
throw new Error("parameter 'tool' is required");
}
// recursive when check=true
if (check) {
const result = yield which(tool, false);
if (!result) {
if (ioUtil.IS_WINDOWS) {
throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`);
}
else {
throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`);
}
}
return result;
}
const matches = yield findInPath(tool);
if (matches && matches.length > 0) {
return matches[0];
}
return '';
});
}
exports.which = which;
/**
* Returns a list of all occurrences of the given tool on the system path.
*
* @returns Promise the paths of the tool
*/
function findInPath(tool) {
return __awaiter(this, void 0, void 0, function* () {
if (!tool) {
throw new Error("parameter 'tool' is required");
}
// build the list of extensions to try
const extensions = [];
if (ioUtil.IS_WINDOWS && process.env['PATHEXT']) {
for (const extension of process.env['PATHEXT'].split(path.delimiter)) {
if (extension) {
extensions.push(extension);
}
}
}
// if it's rooted, return it if exists. otherwise return empty.
if (ioUtil.isRooted(tool)) {
const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions);
if (filePath) {
return [filePath];
}
return [];
}
// if any path separators, return empty
if (tool.includes(path.sep)) {
return [];
}
// build the list of directories
//
// Note, technically "where" checks the current directory on Windows. From a toolkit perspective,
// it feels like we should not do this. Checking the current directory seems like more of a use
// case of a shell, and the which() function exposed by the toolkit should strive for consistency
// across platforms.
const directories = [];
if (process.env.PATH) {
for (const p of process.env.PATH.split(path.delimiter)) {
if (p) {
directories.push(p);
}
}
}
// find all matches
const matches = [];
for (const directory of directories) {
const filePath = yield ioUtil.tryGetExecutablePath(path.join(directory, tool), extensions);
if (filePath) {
matches.push(filePath);
}
}
return matches;
});
}
exports.findInPath = findInPath;
function readCopyOptions(options) {
const force = options.force == null ? true : options.force;
const recursive = Boolean(options.recursive);
return { force, recursive };
}
function cpDirRecursive(sourceDir, destDir, currentDepth, force) {
return __awaiter(this, void 0, void 0, function* () {
// Ensure there is not a run away recursive copy
if (currentDepth >= 255)
return;
currentDepth++;
yield mkdirP(destDir);
const files = yield ioUtil.readdir(sourceDir);
for (const fileName of files) {
const srcFile = `${sourceDir}/${fileName}`;
const destFile = `${destDir}/${fileName}`;
const srcFileStat = yield ioUtil.lstat(srcFile);
if (srcFileStat.isDirectory()) {
// Recurse
yield cpDirRecursive(srcFile, destFile, currentDepth, force);
}
else {
yield copyFile(srcFile, destFile, force);
}
}
// Change the mode for the newly created directory
yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode);
});
}
// Buffered file copy
function copyFile(srcFile, destFile, force) {
return __awaiter(this, void 0, void 0, function* () {
if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) {
// unlink/re-link it
try {
yield ioUtil.lstat(destFile);
yield ioUtil.unlink(destFile);
}
catch (e) {
// Try to override file permission
if (e.code === 'EPERM') {
yield ioUtil.chmod(destFile, '0666');
yield ioUtil.unlink(destFile);
}
// other errors = it doesn't exist, no work to do
}
// Copy over symlink
const symlinkFull = yield ioUtil.readlink(srcFile);
yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? 'junction' : null);
}
else if (!(yield ioUtil.exists(destFile)) || force) {
yield ioUtil.copyFile(srcFile, destFile);
}
});
}
//# sourceMappingURL=io.js.map
/***/ }),
/***/ 56664:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
const tslib_1 = __nccwpck_require__(4351);
tslib_1.__exportStar(__nccwpck_require__(37233), exports);
//# sourceMappingURL=api.js.map
/***/ }),
/***/ 48698:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.Attach = void 0;
const querystring = __nccwpck_require__(63477);
const terminal_size_queue_1 = __nccwpck_require__(76023);
const web_socket_handler_1 = __nccwpck_require__(47581);
class Attach {
constructor(config, websocketInterface) {
this.handler = websocketInterface || new web_socket_handler_1.WebSocketHandler(config);
}
async attach(namespace, podName, containerName, stdout, stderr, stdin, tty) {
const query = {
container: containerName,
stderr: stderr != null,
stdin: stdin != null,
stdout: stdout != null,
tty,
};
const queryStr = querystring.stringify(query);
const path = `/api/v1/namespaces/${namespace}/pods/${podName}/attach?${queryStr}`;
const conn = await this.handler.connect(path, null, (streamNum, buff) => {
web_socket_handler_1.WebSocketHandler.handleStandardStreams(streamNum, buff, stdout, stderr);
return true;
});
if (stdin != null) {
web_socket_handler_1.WebSocketHandler.handleStandardInput(conn, stdin, web_socket_handler_1.WebSocketHandler.StdinStream);
}
if (terminal_size_queue_1.isResizable(stdout)) {
this.terminalSizeQueue = new terminal_size_queue_1.TerminalSizeQueue();
web_socket_handler_1.WebSocketHandler.handleStandardInput(conn, this.terminalSizeQueue, web_socket_handler_1.WebSocketHandler.ResizeStream);
this.terminalSizeQueue.handleResizes(stdout);
}
return conn;
}
}
exports.Attach = Attach;
//# sourceMappingURL=attach.js.map
/***/ }),
/***/ 83237:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.AzureAuth = void 0;
const tslib_1 = __nccwpck_require__(4351);
const proc = tslib_1.__importStar(__nccwpck_require__(32081));
const jsonpath = tslib_1.__importStar(__nccwpck_require__(63269));
class AzureAuth {
isAuthProvider(user) {
if (!user || !user.authProvider) {
return false;
}
return user.authProvider.name === 'azure';
}
async applyAuthentication(user, opts) {
const token = this.getToken(user);
if (token) {
opts.headers.Authorization = `Bearer ${token}`;
}
}
getToken(user) {
const config = user.authProvider.config;
if (this.isExpired(config)) {
this.updateAccessToken(config);
}
return config['access-token'];
}
isExpired(config) {
const token = config['access-token'];
const expiry = config.expiry;
const expiresOn = config['expires-on'];
if (!token) {
return true;
}
if (!expiry && !expiresOn) {
return false;
}
const expiresOnDate = expiresOn ? new Date(parseInt(expiresOn, 10) * 1000) : undefined;
const expiration = expiry ? Date.parse(expiry) : expiresOnDate;
if (expiration < Date.now()) {
return true;
}
return false;
}
updateAccessToken(config) {
let cmd = config['cmd-path'];
if (!cmd) {
throw new Error('Token is expired!');
}
// Wrap cmd in quotes to make it cope with spaces in path
cmd = `"${cmd}"`;
const args = config['cmd-args'];
if (args) {
cmd = cmd + ' ' + args;
}
// TODO: Cache to file?
// TODO: do this asynchronously
let output;
try {
output = proc.execSync(cmd);
}
catch (err) {
throw new Error('Failed to refresh token: ' + err.message);
}
const resultObj = JSON.parse(output);
const tokenPathKeyInConfig = config['token-key'];
const expiryPathKeyInConfig = config['expiry-key'];
// Format in file is {}, so slice it out and add '$'
const tokenPathKey = '$' + tokenPathKeyInConfig.slice(1, -1);
const expiryPathKey = '$' + expiryPathKeyInConfig.slice(1, -1);
config['access-token'] = jsonpath.JSONPath(tokenPathKey, resultObj);
config.expiry = jsonpath.JSONPath(expiryPathKey, resultObj);
}
}
exports.AzureAuth = AzureAuth;
//# sourceMappingURL=azure_auth.js.map
/***/ }),
/***/ 5434:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.deleteObject = exports.addOrUpdateObject = exports.deleteItems = exports.ListWatch = void 0;
const api_1 = __nccwpck_require__(56664);
const informer_1 = __nccwpck_require__(88029);
class ListWatch {
constructor(path, watch, listFn, autoStart = true, labelSelector) {
this.path = path;
this.watch = watch;
this.listFn = listFn;
this.labelSelector = labelSelector;
this.objects = [];
this.indexCache = {};
this.callbackCache = {};
this.stopped = false;
this.callbackCache[informer_1.ADD] = [];
this.callbackCache[informer_1.UPDATE] = [];
this.callbackCache[informer_1.DELETE] = [];
this.callbackCache[informer_1.ERROR] = [];
this.callbackCache[informer_1.CONNECT] = [];
this.resourceVersion = '';
if (autoStart) {
this.doneHandler(null);
}
}
async start() {
this.stopped = false;
await this.doneHandler(null);
}
async stop() {
this.stopped = true;
this._stop();
}
on(verb, cb) {
if (verb === informer_1.CHANGE) {
this.on('add', cb);
this.on('update', cb);
this.on('delete', cb);
return;
}
if (this.callbackCache[verb] === undefined) {
throw new Error(`Unknown verb: ${verb}`);
}
this.callbackCache[verb].push(cb);
}
off(verb, cb) {
if (verb === informer_1.CHANGE) {
this.off('add', cb);
this.off('update', cb);
this.off('delete', cb);
return;
}
if (this.callbackCache[verb] === undefined) {
throw new Error(`Unknown verb: ${verb}`);
}
const indexToRemove = this.callbackCache[verb].findIndex((cachedCb) => cachedCb === cb);
if (indexToRemove === -1) {
return;
}
this.callbackCache[verb].splice(indexToRemove, 1);
}
get(name, namespace) {
return this.objects.find((obj) => {
return obj.metadata.name === name && (!namespace || obj.metadata.namespace === namespace);
});
}
list(namespace) {
if (!namespace) {
return this.objects;
}
return this.indexCache[namespace];
}
latestResourceVersion() {
return this.resourceVersion;
}
_stop() {
if (this.request) {
this.request.abort();
this.request = undefined;
}
}
async doneHandler(err) {
this._stop();
if (err && err.statusCode === 410) {
this.resourceVersion = '';
}
else if (err) {
this.callbackCache[informer_1.ERROR].forEach((elt) => elt(err));
return;
}
if (this.stopped) {
// do not auto-restart
return;
}
this.callbackCache[informer_1.CONNECT].forEach((elt) => elt(undefined));
if (!this.resourceVersion) {
const promise = this.listFn();
const result = await promise;
const list = result.body;
this.objects = deleteItems(this.objects, list.items, this.callbackCache[informer_1.DELETE].slice());
Object.keys(this.indexCache).forEach((key) => {
const updateObjects = deleteItems(this.indexCache[key], list.items);
if (updateObjects.length !== 0) {
this.indexCache[key] = updateObjects;
}
else {
delete this.indexCache[key];
}
});
this.addOrUpdateItems(list.items);
this.resourceVersion = list.metadata.resourceVersion;
}
const queryParams = {
resourceVersion: this.resourceVersion,
};
if (this.labelSelector !== undefined) {
queryParams.labelSelector = api_1.ObjectSerializer.serialize(this.labelSelector, 'string');
}
this.request = await this.watch.watch(this.path, queryParams, this.watchHandler.bind(this), this.doneHandler.bind(this));
}
addOrUpdateItems(items) {
items.forEach((obj) => {
addOrUpdateObject(this.objects, obj, this.callbackCache[informer_1.ADD].slice(), this.callbackCache[informer_1.UPDATE].slice());
if (obj.metadata.namespace) {
this.indexObj(obj);
}
});
}
indexObj(obj) {
let namespaceList = this.indexCache[obj.metadata.namespace];
if (!namespaceList) {
namespaceList = [];
this.indexCache[obj.metadata.namespace] = namespaceList;
}
addOrUpdateObject(namespaceList, obj);
}
watchHandler(phase, obj, watchObj) {
switch (phase) {
case 'ADDED':
case 'MODIFIED':
addOrUpdateObject(this.objects, obj, this.callbackCache[informer_1.ADD].slice(), this.callbackCache[informer_1.UPDATE].slice());
if (obj.metadata.namespace) {
this.indexObj(obj);
}
break;
case 'DELETED':
deleteObject(this.objects, obj, this.callbackCache[informer_1.DELETE].slice());
if (obj.metadata.namespace) {
const namespaceList = this.indexCache[obj.metadata.namespace];
if (namespaceList) {
deleteObject(namespaceList, obj);
}
}
break;
case 'BOOKMARK':
// nothing to do, here for documentation, mostly.
break;
}
if (watchObj && watchObj.metadata) {
this.resourceVersion = watchObj.metadata.resourceVersion;
}
}
}
exports.ListWatch = ListWatch;
// external for testing
function deleteItems(oldObjects, newObjects, deleteCallback) {
return oldObjects.filter((obj) => {
if (findKubernetesObject(newObjects, obj) === -1) {
if (deleteCallback) {
deleteCallback.forEach((fn) => fn(obj));
}
return false;
}
return true;
});
}
exports.deleteItems = deleteItems;
// Only public for testing.
function addOrUpdateObject(objects, obj, addCallback, updateCallback) {
const ix = findKubernetesObject(objects, obj);
if (ix === -1) {
objects.push(obj);
if (addCallback) {
addCallback.forEach((elt) => elt(obj));
}
}
else {
if (!isSameVersion(objects[ix], obj)) {
objects[ix] = obj;
if (updateCallback) {
updateCallback.forEach((elt) => elt(obj));
}
}
}
}
exports.addOrUpdateObject = addOrUpdateObject;
function isSameObject(o1, o2) {
return o1.metadata.name === o2.metadata.name && o1.metadata.namespace === o2.metadata.namespace;
}
function isSameVersion(o1, o2) {
return (o1.metadata.resourceVersion !== undefined &&
o1.metadata.resourceVersion !== null &&
o1.metadata.resourceVersion === o2.metadata.resourceVersion);
}
function findKubernetesObject(objects, obj) {
return objects.findIndex((elt) => {
return isSameObject(elt, obj);
});
}
// Public for testing.
function deleteObject(objects, obj, deleteCallback) {
const ix = findKubernetesObject(objects, obj);
if (ix !== -1) {
objects.splice(ix, 1);
if (deleteCallback) {
deleteCallback.forEach((elt) => elt(obj));
}
}
}
exports.deleteObject = deleteObject;
//# sourceMappingURL=cache.js.map
/***/ }),
/***/ 14958:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.findObject = exports.findHomeDir = exports.bufferFromFileOrString = exports.makeAbsolutePath = exports.Config = exports.KubeConfig = void 0;
const tslib_1 = __nccwpck_require__(4351);
const execa = __nccwpck_require__(56754);
const fs = __nccwpck_require__(57147);
const yaml = __nccwpck_require__(21917);
const net = __nccwpck_require__(41808);
const path = __nccwpck_require__(71017);
const shelljs = __nccwpck_require__(33516);
const api = tslib_1.__importStar(__nccwpck_require__(56664));
const azure_auth_1 = __nccwpck_require__(83237);
const config_types_1 = __nccwpck_require__(86218);
const exec_auth_1 = __nccwpck_require__(18325);
const file_auth_1 = __nccwpck_require__(38572);
const gcp_auth_1 = __nccwpck_require__(94064);
const oidc_auth_1 = __nccwpck_require__(41691);
// fs.existsSync was removed in node 10
function fileExists(filepath) {
try {
fs.accessSync(filepath);
return true;
}
catch (ignore) {
return false;
}
}
class KubeConfig {
constructor() {
this.contexts = [];
this.clusters = [];
this.users = [];
}
getContexts() {
return this.contexts;
}
getClusters() {
return this.clusters;
}
getUsers() {
return this.users;
}
getCurrentContext() {
return this.currentContext;
}
setCurrentContext(context) {
this.currentContext = context;
}
getContextObject(name) {
if (!this.contexts) {
return null;
}
return findObject(this.contexts, name, 'context');
}
getCurrentCluster() {
const context = this.getCurrentContextObject();
if (!context) {
return null;
}
return this.getCluster(context.cluster);
}
getCluster(name) {
return findObject(this.clusters, name, 'cluster');
}
getCurrentUser() {
const ctx = this.getCurrentContextObject();
if (!ctx) {
return null;
}
return this.getUser(ctx.user);
}
getUser(name) {
return findObject(this.users, name, 'user');
}
loadFromFile(file, opts) {
const rootDirectory = path.dirname(file);
this.loadFromString(fs.readFileSync(file, 'utf8'), opts);
this.makePathsAbsolute(rootDirectory);
}
async applytoHTTPSOptions(opts) {
const user = this.getCurrentUser();
await this.applyOptions(opts);
if (user && user.username) {
opts.auth = `${user.username}:${user.password}`;
}
}
async applyToRequest(opts) {
const cluster = this.getCurrentCluster();
const user = this.getCurrentUser();
await this.applyOptions(opts);
if (cluster && cluster.skipTLSVerify) {
opts.strictSSL = false;
}
if (user && user.username) {
opts.auth = {
password: user.password,
username: user.username,
};
}
}
loadFromString(config, opts) {
const obj = yaml.load(config);
this.clusters = config_types_1.newClusters(obj.clusters, opts);
this.contexts = config_types_1.newContexts(obj.contexts, opts);
this.users = config_types_1.newUsers(obj.users, opts);
this.currentContext = obj['current-context'];
}
loadFromOptions(options) {
this.clusters = options.clusters;
this.contexts = options.contexts;
this.users = options.users;
this.currentContext = options.currentContext;
}
loadFromClusterAndUser(cluster, user) {
this.clusters = [cluster];
this.users = [user];
this.currentContext = 'loaded-context';
this.contexts = [
{
cluster: cluster.name,
user: user.name,
name: this.currentContext,
},
];
}
loadFromCluster(pathPrefix = '') {
const host = process.env.KUBERNETES_SERVICE_HOST;
const port = process.env.KUBERNETES_SERVICE_PORT;
const clusterName = 'inCluster';
const userName = 'inClusterUser';
const contextName = 'inClusterContext';
let scheme = 'https';
if (port === '80' || port === '8080' || port === '8001') {
scheme = 'http';
}
// Wrap raw IPv6 addresses in brackets.
let serverHost = host;
if (host && net.isIPv6(host)) {
serverHost = `[${host}]`;
}
this.clusters = [
{
name: clusterName,
caFile: `${pathPrefix}${Config.SERVICEACCOUNT_CA_PATH}`,
server: `${scheme}://${serverHost}:${port}`,
skipTLSVerify: false,
},
];
this.users = [
{
name: userName,
authProvider: {
name: 'tokenFile',
config: {
tokenFile: `${pathPrefix}${Config.SERVICEACCOUNT_TOKEN_PATH}`,
},
},
},
];
const namespaceFile = `${pathPrefix}${Config.SERVICEACCOUNT_NAMESPACE_PATH}`;
let namespace;
if (fileExists(namespaceFile)) {
namespace = fs.readFileSync(namespaceFile, 'utf8');
}
this.contexts = [
{
cluster: clusterName,
name: contextName,
user: userName,
namespace,
},
];
this.currentContext = contextName;
}
mergeConfig(config, preserveContext = false) {
if (!preserveContext) {
this.currentContext = config.currentContext;
}
config.clusters.forEach((cluster) => {
this.addCluster(cluster);
});
config.users.forEach((user) => {
this.addUser(user);
});
config.contexts.forEach((ctx) => {
this.addContext(ctx);
});
}
addCluster(cluster) {
if (!this.clusters) {
this.clusters = [];
}
this.clusters.forEach((c, ix) => {
if (c.name === cluster.name) {
throw new Error(`Duplicate cluster: ${c.name}`);
}
});
this.clusters.push(cluster);
}
addUser(user) {
if (!this.users) {
this.users = [];
}
this.users.forEach((c, ix) => {
if (c.name === user.name) {
throw new Error(`Duplicate user: ${c.name}`);
}
});
this.users.push(user);
}
addContext(ctx) {
if (!this.contexts) {
this.contexts = [];
}
this.contexts.forEach((c, ix) => {
if (c.name === ctx.name) {
throw new Error(`Duplicate context: ${c.name}`);
}
});
this.contexts.push(ctx);
}
loadFromDefault(opts, contextFromStartingConfig = false) {
if (process.env.KUBECONFIG && process.env.KUBECONFIG.length > 0) {
const files = process.env.KUBECONFIG.split(path.delimiter).filter((filename) => filename);
this.loadFromFile(files[0], opts);
for (let i = 1; i < files.length; i++) {
const kc = new KubeConfig();
kc.loadFromFile(files[i], opts);
this.mergeConfig(kc, contextFromStartingConfig);
}
return;
}
const home = findHomeDir();
if (home) {
const config = path.join(home, '.kube', 'config');
if (fileExists(config)) {
this.loadFromFile(config, opts);
return;
}
}
if (process.platform === 'win32' && shelljs.which('wsl.exe')) {
try {
const envKubeconfigPathResult = execa.sync('wsl.exe', ['bash', '-ic', 'printenv KUBECONFIG']);
if (envKubeconfigPathResult.exitCode === 0 && envKubeconfigPathResult.stdout.length > 0) {
const result = execa.sync('wsl.exe', ['cat', envKubeconfigPathResult.stdout]);
if (result.exitCode === 0) {
this.loadFromString(result.stdout, opts);
return;
}
if (result.exitCode === 0) {
this.loadFromString(result.stdout, opts);
return;
}
}
}
catch (err) {
// Falling back to default kubeconfig
}
try {
const result = execa.sync('wsl.exe', ['cat', '~/.kube/config']);
if (result.exitCode === 0) {
this.loadFromString(result.stdout, opts);
return;
}
}
catch (err) {
// Falling back to alternative auth
}
}
if (fileExists(Config.SERVICEACCOUNT_TOKEN_PATH)) {
this.loadFromCluster();
return;
}
this.loadFromClusterAndUser({ name: 'cluster', server: 'http://localhost:8080' }, { name: 'user' });
}
makeApiClient(apiClientType) {
const cluster = this.getCurrentCluster();
if (!cluster) {
throw new Error('No active cluster!');
}
const apiClient = new apiClientType(cluster.server);
apiClient.setDefaultAuthentication(this);
return apiClient;
}
makePathsAbsolute(rootDirectory) {
this.clusters.forEach((cluster) => {
if (cluster.caFile) {
cluster.caFile = makeAbsolutePath(rootDirectory, cluster.caFile);
}
});
this.users.forEach((user) => {
if (user.certFile) {
user.certFile = makeAbsolutePath(rootDirectory, user.certFile);
}
if (user.keyFile) {
user.keyFile = makeAbsolutePath(rootDirectory, user.keyFile);
}
});
}
exportConfig() {
const configObj = {
apiVersion: 'v1',
kind: 'Config',
clusters: this.clusters.map(config_types_1.exportCluster),
users: this.users.map(config_types_1.exportUser),
contexts: this.contexts.map(config_types_1.exportContext),
preferences: {},
'current-context': this.getCurrentContext(),
};
return JSON.stringify(configObj);
}
getCurrentContextObject() {
return this.getContextObject(this.currentContext);
}
applyHTTPSOptions(opts) {
const cluster = this.getCurrentCluster();
const user = this.getCurrentUser();
if (!user) {
return;
}
if (cluster != null && cluster.skipTLSVerify) {
opts.rejectUnauthorized = false;
}
const ca = cluster != null ? bufferFromFileOrString(cluster.caFile, cluster.caData) : null;
if (ca) {
opts.ca = ca;
}
const cert = bufferFromFileOrString(user.certFile, user.certData);
if (cert) {
opts.cert = cert;
}
const key = bufferFromFileOrString(user.keyFile, user.keyData);
if (key) {
opts.key = key;
}
}
async applyAuthorizationHeader(opts) {
const user = this.getCurrentUser();
if (!user) {
return;
}
const authenticator = KubeConfig.authenticators.find((elt) => {
return elt.isAuthProvider(user);
});
if (!opts.headers) {
opts.headers = {};
}
if (authenticator) {
await authenticator.applyAuthentication(user, opts);
}
if (user.token) {
opts.headers.Authorization = `Bearer ${user.token}`;
}
}
async applyOptions(opts) {
this.applyHTTPSOptions(opts);
await this.applyAuthorizationHeader(opts);
}
}
exports.KubeConfig = KubeConfig;
KubeConfig.authenticators = [
new azure_auth_1.AzureAuth(),
new gcp_auth_1.GoogleCloudPlatformAuth(),
new exec_auth_1.ExecAuth(),
new file_auth_1.FileAuth(),
new oidc_auth_1.OpenIDConnectAuth(),
];
// This class is deprecated and will eventually be removed.
class Config {
static fromFile(filename) {
return Config.apiFromFile(filename, api.CoreV1Api);
}
static fromCluster() {
return Config.apiFromCluster(api.CoreV1Api);
}
static defaultClient() {
return Config.apiFromDefaultClient(api.CoreV1Api);
}
static apiFromFile(filename, apiClientType) {
const kc = new KubeConfig();
kc.loadFromFile(filename);
return kc.makeApiClient(apiClientType);
}
static apiFromCluster(apiClientType) {
const kc = new KubeConfig();
kc.loadFromCluster();
const cluster = kc.getCurrentCluster();
if (!cluster) {
throw new Error('No active cluster!');
}
const k8sApi = new apiClientType(cluster.server);
k8sApi.setDefaultAuthentication(kc);
return k8sApi;
}
static apiFromDefaultClient(apiClientType) {
const kc = new KubeConfig();
kc.loadFromDefault();
return kc.makeApiClient(apiClientType);
}
}
exports.Config = Config;
Config.SERVICEACCOUNT_ROOT = '/var/run/secrets/kubernetes.io/serviceaccount';
Config.SERVICEACCOUNT_CA_PATH = Config.SERVICEACCOUNT_ROOT + '/ca.crt';
Config.SERVICEACCOUNT_TOKEN_PATH = Config.SERVICEACCOUNT_ROOT + '/token';
Config.SERVICEACCOUNT_NAMESPACE_PATH = Config.SERVICEACCOUNT_ROOT + '/namespace';
function makeAbsolutePath(root, file) {
if (!root || path.isAbsolute(file)) {
return file;
}
return path.join(root, file);
}
exports.makeAbsolutePath = makeAbsolutePath;
// This is public really only for testing.
function bufferFromFileOrString(file, data) {
if (file) {
return fs.readFileSync(file);
}
if (data) {
return Buffer.from(data, 'base64');
}
return null;
}
exports.bufferFromFileOrString = bufferFromFileOrString;
function dropDuplicatesAndNils(a) {
return a.reduce((acceptedValues, currentValue) => {
// Good-enough algorithm for reducing a small (3 items at this point) array into an ordered list
// of unique non-empty strings.
if (currentValue && !acceptedValues.includes(currentValue)) {
return acceptedValues.concat(currentValue);
}
else {
return acceptedValues;
}
}, []);
}
// Only public for testing.
function findHomeDir() {
if (process.platform !== 'win32') {
if (process.env.HOME) {
try {
fs.accessSync(process.env.HOME);
return process.env.HOME;
// tslint:disable-next-line:no-empty
}
catch (ignore) { }
}
return null;
}
// $HOME is always favoured, but the k8s go-client prefers the other two env vars
// differently depending on whether .kube/config exists or not.
const homeDrivePath = process.env.HOMEDRIVE && process.env.HOMEPATH
? path.join(process.env.HOMEDRIVE, process.env.HOMEPATH)
: '';
const homePath = process.env.HOME || '';
const userProfile = process.env.USERPROFILE || '';
const favourHomeDrivePathList = dropDuplicatesAndNils([homePath, homeDrivePath, userProfile]);
const favourUserProfileList = dropDuplicatesAndNils([homePath, userProfile, homeDrivePath]);
// 1. the first of %HOME%, %HOMEDRIVE%%HOMEPATH%, %USERPROFILE% containing a `.kube\config` file is returned.
for (const dir of favourHomeDrivePathList) {
try {
fs.accessSync(path.join(dir, '.kube', 'config'));
return dir;
// tslint:disable-next-line:no-empty
}
catch (ignore) { }
}
// 2. ...the first of %HOME%, %USERPROFILE%, %HOMEDRIVE%%HOMEPATH% that exists and is writeable is returned
for (const dir of favourUserProfileList) {
try {
fs.accessSync(dir, fs.constants.W_OK);
return dir;
// tslint:disable-next-line:no-empty
}
catch (ignore) { }
}
// 3. ...the first of %HOME%, %USERPROFILE%, %HOMEDRIVE%%HOMEPATH% that exists is returned.
for (const dir of favourUserProfileList) {
try {
fs.accessSync(dir);
return dir;
// tslint:disable-next-line:no-empty
}
catch (ignore) { }
}
// 4. if none of those locations exists, the first of
// %HOME%, %USERPROFILE%, %HOMEDRIVE%%HOMEPATH% that is set is returned.
return favourUserProfileList[0] || null;
}
exports.findHomeDir = findHomeDir;
// Only really public for testing...
function findObject(list, name, key) {
if (!list) {
return null;
}
for (const obj of list) {
if (obj.name === name) {
if (obj[key]) {
obj[key].name = name;
return obj[key];
}
return obj;
}
}
return null;
}
exports.findObject = findObject;
//# sourceMappingURL=config.js.map
/***/ }),
/***/ 86218:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.exportContext = exports.newContexts = exports.exportUser = exports.newUsers = exports.exportCluster = exports.newClusters = exports.ActionOnInvalid = void 0;
const tslib_1 = __nccwpck_require__(4351);
const fs = tslib_1.__importStar(__nccwpck_require__(57147));
const _ = tslib_1.__importStar(__nccwpck_require__(15067));
var ActionOnInvalid;
(function (ActionOnInvalid) {
ActionOnInvalid["THROW"] = "throw";
ActionOnInvalid["FILTER"] = "filter";
})(ActionOnInvalid = exports.ActionOnInvalid || (exports.ActionOnInvalid = {}));
function defaultNewConfigOptions() {
return {
onInvalidEntry: ActionOnInvalid.THROW,
};
}
function newClusters(a, opts) {
const options = Object.assign(defaultNewConfigOptions(), opts || {});
return _.compact(_.map(a, clusterIterator(options.onInvalidEntry)));
}
exports.newClusters = newClusters;
function exportCluster(cluster) {
return {
name: cluster.name,
cluster: {
server: cluster.server,
'certificate-authority-data': cluster.caData,
'certificate-authority': cluster.caFile,
'insecure-skip-tls-verify': cluster.skipTLSVerify,
},
};
}
exports.exportCluster = exportCluster;
function clusterIterator(onInvalidEntry) {
return (elt, i, list) => {
try {
if (!elt.name) {
throw new Error(`clusters[${i}].name is missing`);
}
if (!elt.cluster) {
throw new Error(`clusters[${i}].cluster is missing`);
}
if (!elt.cluster.server) {
throw new Error(`clusters[${i}].cluster.server is missing`);
}
return {
caData: elt.cluster['certificate-authority-data'],
caFile: elt.cluster['certificate-authority'],
name: elt.name,
server: elt.cluster.server.replace(/\/$/, ''),
skipTLSVerify: elt.cluster['insecure-skip-tls-verify'] === true,
};
}
catch (err) {
switch (onInvalidEntry) {
case ActionOnInvalid.FILTER:
return null;
default:
case ActionOnInvalid.THROW:
throw err;
}
}
};
}
function newUsers(a, opts) {
const options = Object.assign(defaultNewConfigOptions(), opts || {});
return _.compact(_.map(a, userIterator(options.onInvalidEntry)));
}
exports.newUsers = newUsers;
function exportUser(user) {
return {
name: user.name,
user: {
'auth-provider': user.authProvider,
'client-certificate-data': user.certData,
'client-certificate': user.certFile,
exec: user.exec,
'client-key-data': user.keyData,
'client-key': user.keyFile,
token: user.token,
password: user.password,
username: user.username,
},
};
}
exports.exportUser = exportUser;
function userIterator(onInvalidEntry) {
return (elt, i, list) => {
try {
if (!elt.name) {
throw new Error(`users[${i}].name is missing`);
}
return {
authProvider: elt.user ? elt.user['auth-provider'] : null,
certData: elt.user ? elt.user['client-certificate-data'] : null,
certFile: elt.user ? elt.user['client-certificate'] : null,
exec: elt.user ? elt.user.exec : null,
keyData: elt.user ? elt.user['client-key-data'] : null,
keyFile: elt.user ? elt.user['client-key'] : null,
name: elt.name,
token: findToken(elt.user),
password: elt.user ? elt.user.password : null,
username: elt.user ? elt.user.username : null,
};
}
catch (err) {
switch (onInvalidEntry) {
case ActionOnInvalid.FILTER:
return null;
default:
case ActionOnInvalid.THROW:
throw err;
}
}
};
}
function findToken(user) {
if (user) {
if (user.token) {
return user.token;
}
if (user['token-file']) {
return fs.readFileSync(user['token-file']).toString();
}
}
}
function newContexts(a, opts) {
const options = Object.assign(defaultNewConfigOptions(), opts || {});
return _.compact(_.map(a, contextIterator(options.onInvalidEntry)));
}
exports.newContexts = newContexts;
function exportContext(ctx) {
return {
name: ctx.name,
context: ctx,
};
}
exports.exportContext = exportContext;
function contextIterator(onInvalidEntry) {
return (elt, i, list) => {
try {
if (!elt.name) {
throw new Error(`contexts[${i}].name is missing`);
}
if (!elt.context) {
throw new Error(`contexts[${i}].context is missing`);
}
if (!elt.context.cluster) {
throw new Error(`contexts[${i}].context.cluster is missing`);
}
return {
cluster: elt.context.cluster,
name: elt.name,
user: elt.context.user || undefined,
namespace: elt.context.namespace || undefined,
};
}
catch (err) {
switch (onInvalidEntry) {
case ActionOnInvalid.FILTER:
return null;
default:
case ActionOnInvalid.THROW:
throw err;
}
}
};
}
//# sourceMappingURL=config_types.js.map
/***/ }),
/***/ 54815:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.Cp = void 0;
const tslib_1 = __nccwpck_require__(4351);
const fs = tslib_1.__importStar(__nccwpck_require__(57147));
const stream_buffers_1 = __nccwpck_require__(48168);
const tar = tslib_1.__importStar(__nccwpck_require__(74674));
const tmp = tslib_1.__importStar(__nccwpck_require__(68065));
const exec_1 = __nccwpck_require__(62864);
class Cp {
constructor(config, execInstance) {
this.execInstance = execInstance || new exec_1.Exec(config);
}
/**
* @param {string} namespace - The namespace of the pod to exec the command inside.
* @param {string} podName - The name of the pod to exec the command inside.
* @param {string} containerName - The name of the container in the pod to exec the command inside.
* @param {string} srcPath - The source path in the pod
* @param {string} tgtPath - The target path in local
*/
async cpFromPod(namespace, podName, containerName, srcPath, tgtPath) {
const tmpFile = tmp.fileSync();
const tmpFileName = tmpFile.name;
const command = ['tar', 'zcf', '-', srcPath];
const writerStream = fs.createWriteStream(tmpFileName);
const errStream = new stream_buffers_1.WritableStreamBuffer();
this.execInstance.exec(namespace, podName, containerName, command, writerStream, errStream, null, false, async () => {
if (errStream.size()) {
throw new Error(`Error from cpFromPod - details: \n ${errStream.getContentsAsString()}`);
}
await tar.x({
file: tmpFileName,
cwd: tgtPath,
});
});
}
/**
* @param {string} namespace - The namespace of the pod to exec the command inside.
* @param {string} podName - The name of the pod to exec the command inside.
* @param {string} containerName - The name of the container in the pod to exec the command inside.
* @param {string} srcPath - The source path in local
* @param {string} tgtPath - The target path in the pod
*/
async cpToPod(namespace, podName, containerName, srcPath, tgtPath) {
const tmpFile = tmp.fileSync();
const tmpFileName = tmpFile.name;
const command = ['tar', 'xf', '-', '-C', tgtPath];
await tar.c({
file: tmpFile.name,
}, [srcPath]);
const readStream = fs.createReadStream(tmpFileName);
const errStream = new stream_buffers_1.WritableStreamBuffer();
this.execInstance.exec(namespace, podName, containerName, command, null, errStream, readStream, false, async () => {
if (errStream.size()) {
throw new Error(`Error from cpToPod - details: \n ${errStream.getContentsAsString()}`);
}
});
}
}
exports.Cp = Cp;
//# sourceMappingURL=cp.js.map
/***/ }),
/***/ 62864:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.Exec = void 0;
const querystring = __nccwpck_require__(63477);
const terminal_size_queue_1 = __nccwpck_require__(76023);
const web_socket_handler_1 = __nccwpck_require__(47581);
class Exec {
constructor(config, wsInterface) {
this.handler = wsInterface || new web_socket_handler_1.WebSocketHandler(config);
}
/**
* @param {string} namespace - The namespace of the pod to exec the command inside.
* @param {string} podName - The name of the pod to exec the command inside.
* @param {string} containerName - The name of the container in the pod to exec the command inside.
* @param {(string|string[])} command - The command or command and arguments to execute.
* @param {stream.Writable} stdout - The stream to write stdout data from the command.
* @param {stream.Writable} stderr - The stream to write stderr data from the command.
* @param {stream.Readable} stdin - The stream to write stdin data into the command.
* @param {boolean} tty - Should the command execute in a TTY enabled session.
* @param {(V1Status) => void} statusCallback -
* A callback to received the status (e.g. exit code) from the command, optional.
* @return {string} This is the result
*/
async exec(namespace, podName, containerName, command, stdout, stderr, stdin, tty, statusCallback) {
const query = {
stdout: stdout != null,
stderr: stderr != null,
stdin: stdin != null,
tty,
command,
container: containerName,
};
const queryStr = querystring.stringify(query);
const path = `/api/v1/namespaces/${namespace}/pods/${podName}/exec?${queryStr}`;
const conn = await this.handler.connect(path, null, (streamNum, buff) => {
const status = web_socket_handler_1.WebSocketHandler.handleStandardStreams(streamNum, buff, stdout, stderr);
if (status != null) {
if (statusCallback) {
statusCallback(status);
}
return false;
}
return true;
});
if (stdin != null) {
web_socket_handler_1.WebSocketHandler.handleStandardInput(conn, stdin, web_socket_handler_1.WebSocketHandler.StdinStream);
}
if (terminal_size_queue_1.isResizable(stdout)) {
this.terminalSizeQueue = new terminal_size_queue_1.TerminalSizeQueue();
web_socket_handler_1.WebSocketHandler.handleStandardInput(conn, this.terminalSizeQueue, web_socket_handler_1.WebSocketHandler.ResizeStream);
this.terminalSizeQueue.handleResizes(stdout);
}
return conn;
}
}
exports.Exec = Exec;
//# sourceMappingURL=exec.js.map
/***/ }),
/***/ 18325:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.ExecAuth = void 0;
const execa = __nccwpck_require__(56754);
class ExecAuth {
constructor() {
this.tokenCache = {};
this.execFn = execa.sync;
}
isAuthProvider(user) {
if (!user) {
return false;
}
if (user.exec) {
return true;
}
if (!user.authProvider) {
return false;
}
return (user.authProvider.name === 'exec' || !!(user.authProvider.config && user.authProvider.config.exec));
}
async applyAuthentication(user, opts) {
const credential = this.getCredential(user);
if (!credential) {
return;
}
if (credential.status.clientCertificateData) {
opts.cert = credential.status.clientCertificateData;
}
if (credential.status.clientKeyData) {
opts.key = credential.status.clientKeyData;
}
const token = this.getToken(credential);
if (token) {
if (!opts.headers) {
opts.headers = [];
}
opts.headers.Authorization = `Bearer ${token}`;
}
}
getToken(credential) {
if (!credential) {
return null;
}
if (credential.status.token) {
return credential.status.token;
}
return null;
}
getCredential(user) {
// TODO: Add a unit test for token caching.
const cachedToken = this.tokenCache[user.name];
if (cachedToken) {
const date = Date.parse(cachedToken.status.expirationTimestamp);
if (date > Date.now()) {
return cachedToken;
}
this.tokenCache[user.name] = null;
}
let exec = null;
if (user.authProvider && user.authProvider.config) {
exec = user.authProvider.config.exec;
}
if (user.exec) {
exec = user.exec;
}
if (!exec) {
return null;
}
if (!exec.command) {
throw new Error('No command was specified for exec authProvider!');
}
let opts = {};
if (exec.env) {
const env = process.env;
exec.env.forEach((elt) => (env[elt.name] = elt.value));
opts = { ...opts, env };
}
const result = this.execFn(exec.command, exec.args, opts);
if (result.exitCode === 0) {
const obj = JSON.parse(result.stdout);
this.tokenCache[user.name] = obj;
return obj;
}
throw new Error(result.stderr);
}
}
exports.ExecAuth = ExecAuth;
//# sourceMappingURL=exec_auth.js.map
/***/ }),
/***/ 38572:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.FileAuth = void 0;
const fs = __nccwpck_require__(57147);
class FileAuth {
constructor() {
this.token = null;
this.lastRead = null;
}
isAuthProvider(user) {
return user.authProvider && user.authProvider.config && user.authProvider.config.tokenFile;
}
async applyAuthentication(user, opts) {
if (this.token == null) {
this.refreshToken(user.authProvider.config.tokenFile);
}
if (this.isTokenExpired()) {
this.refreshToken(user.authProvider.config.tokenFile);
}
if (this.token) {
opts.headers.Authorization = `Bearer ${this.token}`;
}
}
refreshToken(filePath) {
// TODO make this async?
this.token = fs.readFileSync(filePath).toString('UTF-8');
this.lastRead = new Date();
}
isTokenExpired() {
if (this.lastRead === null) {
return true;
}
const now = new Date();
const delta = (now.getTime() - this.lastRead.getTime()) / 1000;
// For now just refresh every 60 seconds. This is imperfect since the token
// could be out of date for this time, but it is unlikely and it's also what
// the client-go library does.
// TODO: Use file notifications instead?
return delta > 60;
}
}
exports.FileAuth = FileAuth;
//# sourceMappingURL=file_auth.js.map
/***/ }),
/***/ 94064:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.GoogleCloudPlatformAuth = void 0;
const tslib_1 = __nccwpck_require__(4351);
const proc = tslib_1.__importStar(__nccwpck_require__(32081));
const jsonpath = tslib_1.__importStar(__nccwpck_require__(63269));
class GoogleCloudPlatformAuth {
isAuthProvider(user) {
if (!user || !user.authProvider) {
return false;
}
return user.authProvider.name === 'gcp';
}
async applyAuthentication(user, opts) {
const token = this.getToken(user);
if (token) {
opts.headers.Authorization = `Bearer ${token}`;
}
}
getToken(user) {
const config = user.authProvider.config;
if (this.isExpired(config)) {
this.updateAccessToken(config);
}
return config['access-token'];
}
isExpired(config) {
const token = config['access-token'];
const expiry = config.expiry;
if (!token) {
return true;
}
if (!expiry) {
return false;
}
const expiration = Date.parse(expiry);
if (expiration < Date.now()) {
return true;
}
return false;
}
updateAccessToken(config) {
let cmd = config['cmd-path'];
if (!cmd) {
throw new Error('Token is expired!');
}
// Wrap cmd in quotes to make it cope with spaces in path
cmd = `"${cmd}"`;
const args = config['cmd-args'];
if (args) {
cmd = cmd + ' ' + args;
}
// TODO: Cache to file?
// TODO: do this asynchronously
let output;
try {
output = proc.execSync(cmd);
}
catch (err) {
throw new Error('Failed to refresh token: ' + err.message);
}
const resultObj = JSON.parse(output);
const tokenPathKeyInConfig = config['token-key'];
const expiryPathKeyInConfig = config['expiry-key'];
// Format in file is {}, so slice it out and add '$'
const tokenPathKey = '$' + tokenPathKeyInConfig.slice(1, -1);
const expiryPathKey = '$' + expiryPathKeyInConfig.slice(1, -1);
config['access-token'] = jsonpath.JSONPath(tokenPathKey, resultObj);
config.expiry = jsonpath.JSONPath(expiryPathKey, resultObj);
}
}
exports.GoogleCloudPlatformAuth = GoogleCloudPlatformAuth;
//# sourceMappingURL=gcp_auth.js.map
/***/ }),
/***/ 37233:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
const tslib_1 = __nccwpck_require__(4351);
// This is the entrypoint for the package
tslib_1.__exportStar(__nccwpck_require__(25997), exports);
tslib_1.__exportStar(__nccwpck_require__(15158), exports);
//# sourceMappingURL=api.js.map
/***/ }),
/***/ 79893:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.AdmissionregistrationApi = exports.AdmissionregistrationApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(4351);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var AdmissionregistrationApiApiKeys;
(function (AdmissionregistrationApiApiKeys) {
AdmissionregistrationApiApiKeys[AdmissionregistrationApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(AdmissionregistrationApiApiKeys = exports.AdmissionregistrationApiApiKeys || (exports.AdmissionregistrationApiApiKeys = {}));
class AdmissionregistrationApi {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[AdmissionregistrationApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* get information of a group
*/
async getAPIGroup(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIGroup");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.AdmissionregistrationApi = AdmissionregistrationApi;
//# sourceMappingURL=admissionregistrationApi.js.map
/***/ }),
/***/ 69218:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.AdmissionregistrationV1Api = exports.AdmissionregistrationV1ApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(4351);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var AdmissionregistrationV1ApiApiKeys;
(function (AdmissionregistrationV1ApiApiKeys) {
AdmissionregistrationV1ApiApiKeys[AdmissionregistrationV1ApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(AdmissionregistrationV1ApiApiKeys = exports.AdmissionregistrationV1ApiApiKeys || (exports.AdmissionregistrationV1ApiApiKeys = {}));
class AdmissionregistrationV1Api {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[AdmissionregistrationV1ApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* create a MutatingWebhookConfiguration
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createMutatingWebhookConfiguration(body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createMutatingWebhookConfiguration.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1MutatingWebhookConfiguration")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1MutatingWebhookConfiguration");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* create a ValidatingWebhookConfiguration
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createValidatingWebhookConfiguration(body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createValidatingWebhookConfiguration.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1ValidatingWebhookConfiguration")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ValidatingWebhookConfiguration");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of MutatingWebhookConfiguration
* @param pretty If \'true\', then the output is pretty printed.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionMutatingWebhookConfiguration(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of ValidatingWebhookConfiguration
* @param pretty If \'true\', then the output is pretty printed.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionValidatingWebhookConfiguration(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a MutatingWebhookConfiguration
* @param name name of the MutatingWebhookConfiguration
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param body
*/
async deleteMutatingWebhookConfiguration(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteMutatingWebhookConfiguration.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a ValidatingWebhookConfiguration
* @param name name of the ValidatingWebhookConfiguration
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param body
*/
async deleteValidatingWebhookConfiguration(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteValidatingWebhookConfiguration.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* get available resources
*/
async getAPIResources(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind MutatingWebhookConfiguration
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listMutatingWebhookConfiguration(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1MutatingWebhookConfigurationList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind ValidatingWebhookConfiguration
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listValidatingWebhookConfiguration(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ValidatingWebhookConfigurationList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified MutatingWebhookConfiguration
* @param name name of the MutatingWebhookConfiguration
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchMutatingWebhookConfiguration(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchMutatingWebhookConfiguration.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchMutatingWebhookConfiguration.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1MutatingWebhookConfiguration");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified ValidatingWebhookConfiguration
* @param name name of the ValidatingWebhookConfiguration
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchValidatingWebhookConfiguration(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchValidatingWebhookConfiguration.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchValidatingWebhookConfiguration.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ValidatingWebhookConfiguration");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified MutatingWebhookConfiguration
* @param name name of the MutatingWebhookConfiguration
* @param pretty If \'true\', then the output is pretty printed.
*/
async readMutatingWebhookConfiguration(name, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readMutatingWebhookConfiguration.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1MutatingWebhookConfiguration");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified ValidatingWebhookConfiguration
* @param name name of the ValidatingWebhookConfiguration
* @param pretty If \'true\', then the output is pretty printed.
*/
async readValidatingWebhookConfiguration(name, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readValidatingWebhookConfiguration.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ValidatingWebhookConfiguration");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified MutatingWebhookConfiguration
* @param name name of the MutatingWebhookConfiguration
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceMutatingWebhookConfiguration(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceMutatingWebhookConfiguration.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceMutatingWebhookConfiguration.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1MutatingWebhookConfiguration")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1MutatingWebhookConfiguration");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified ValidatingWebhookConfiguration
* @param name name of the ValidatingWebhookConfiguration
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceValidatingWebhookConfiguration(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceValidatingWebhookConfiguration.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceValidatingWebhookConfiguration.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1ValidatingWebhookConfiguration")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ValidatingWebhookConfiguration");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.AdmissionregistrationV1Api = AdmissionregistrationV1Api;
//# sourceMappingURL=admissionregistrationV1Api.js.map
/***/ }),
/***/ 67758:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.ApiextensionsApi = exports.ApiextensionsApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(4351);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var ApiextensionsApiApiKeys;
(function (ApiextensionsApiApiKeys) {
ApiextensionsApiApiKeys[ApiextensionsApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(ApiextensionsApiApiKeys = exports.ApiextensionsApiApiKeys || (exports.ApiextensionsApiApiKeys = {}));
class ApiextensionsApi {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[ApiextensionsApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* get information of a group
*/
async getAPIGroup(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apiextensions.k8s.io/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIGroup");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.ApiextensionsApi = ApiextensionsApi;
//# sourceMappingURL=apiextensionsApi.js.map
/***/ }),
/***/ 91294:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.ApiextensionsV1Api = exports.ApiextensionsV1ApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(4351);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var ApiextensionsV1ApiApiKeys;
(function (ApiextensionsV1ApiApiKeys) {
ApiextensionsV1ApiApiKeys[ApiextensionsV1ApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(ApiextensionsV1ApiApiKeys = exports.ApiextensionsV1ApiApiKeys || (exports.ApiextensionsV1ApiApiKeys = {}));
class ApiextensionsV1Api {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[ApiextensionsV1ApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* create a CustomResourceDefinition
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createCustomResourceDefinition(body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apiextensions.k8s.io/v1/customresourcedefinitions';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createCustomResourceDefinition.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1CustomResourceDefinition")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1CustomResourceDefinition");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of CustomResourceDefinition
* @param pretty If \'true\', then the output is pretty printed.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionCustomResourceDefinition(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apiextensions.k8s.io/v1/customresourcedefinitions';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a CustomResourceDefinition
* @param name name of the CustomResourceDefinition
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param body
*/
async deleteCustomResourceDefinition(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteCustomResourceDefinition.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* get available resources
*/
async getAPIResources(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apiextensions.k8s.io/v1/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind CustomResourceDefinition
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listCustomResourceDefinition(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apiextensions.k8s.io/v1/customresourcedefinitions';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1CustomResourceDefinitionList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified CustomResourceDefinition
* @param name name of the CustomResourceDefinition
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchCustomResourceDefinition(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchCustomResourceDefinition.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchCustomResourceDefinition.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1CustomResourceDefinition");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update status of the specified CustomResourceDefinition
* @param name name of the CustomResourceDefinition
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchCustomResourceDefinitionStatus(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchCustomResourceDefinitionStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchCustomResourceDefinitionStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1CustomResourceDefinition");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified CustomResourceDefinition
* @param name name of the CustomResourceDefinition
* @param pretty If \'true\', then the output is pretty printed.
*/
async readCustomResourceDefinition(name, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readCustomResourceDefinition.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1CustomResourceDefinition");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read status of the specified CustomResourceDefinition
* @param name name of the CustomResourceDefinition
* @param pretty If \'true\', then the output is pretty printed.
*/
async readCustomResourceDefinitionStatus(name, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readCustomResourceDefinitionStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1CustomResourceDefinition");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified CustomResourceDefinition
* @param name name of the CustomResourceDefinition
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceCustomResourceDefinition(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceCustomResourceDefinition.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceCustomResourceDefinition.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1CustomResourceDefinition")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1CustomResourceDefinition");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace status of the specified CustomResourceDefinition
* @param name name of the CustomResourceDefinition
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceCustomResourceDefinitionStatus(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceCustomResourceDefinitionStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceCustomResourceDefinitionStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1CustomResourceDefinition")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1CustomResourceDefinition");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.ApiextensionsV1Api = ApiextensionsV1Api;
//# sourceMappingURL=apiextensionsV1Api.js.map
/***/ }),
/***/ 99722:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.ApiregistrationApi = exports.ApiregistrationApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(4351);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var ApiregistrationApiApiKeys;
(function (ApiregistrationApiApiKeys) {
ApiregistrationApiApiKeys[ApiregistrationApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(ApiregistrationApiApiKeys = exports.ApiregistrationApiApiKeys || (exports.ApiregistrationApiApiKeys = {}));
class ApiregistrationApi {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[ApiregistrationApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* get information of a group
*/
async getAPIGroup(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIGroup");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.ApiregistrationApi = ApiregistrationApi;
//# sourceMappingURL=apiregistrationApi.js.map
/***/ }),
/***/ 99365:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.ApiregistrationV1Api = exports.ApiregistrationV1ApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(4351);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var ApiregistrationV1ApiApiKeys;
(function (ApiregistrationV1ApiApiKeys) {
ApiregistrationV1ApiApiKeys[ApiregistrationV1ApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(ApiregistrationV1ApiApiKeys = exports.ApiregistrationV1ApiApiKeys || (exports.ApiregistrationV1ApiApiKeys = {}));
class ApiregistrationV1Api {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[ApiregistrationV1ApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* create an APIService
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createAPIService(body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1/apiservices';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createAPIService.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1APIService")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIService");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete an APIService
* @param name name of the APIService
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param body
*/
async deleteAPIService(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1/apiservices/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteAPIService.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of APIService
* @param pretty If \'true\', then the output is pretty printed.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionAPIService(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1/apiservices';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* get available resources
*/
async getAPIResources(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind APIService
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listAPIService(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1/apiservices';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIServiceList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified APIService
* @param name name of the APIService
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchAPIService(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1/apiservices/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchAPIService.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchAPIService.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIService");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update status of the specified APIService
* @param name name of the APIService
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchAPIServiceStatus(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1/apiservices/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchAPIServiceStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchAPIServiceStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIService");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified APIService
* @param name name of the APIService
* @param pretty If \'true\', then the output is pretty printed.
*/
async readAPIService(name, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1/apiservices/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readAPIService.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIService");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read status of the specified APIService
* @param name name of the APIService
* @param pretty If \'true\', then the output is pretty printed.
*/
async readAPIServiceStatus(name, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1/apiservices/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readAPIServiceStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIService");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified APIService
* @param name name of the APIService
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceAPIService(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1/apiservices/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceAPIService.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceAPIService.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1APIService")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIService");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace status of the specified APIService
* @param name name of the APIService
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceAPIServiceStatus(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1/apiservices/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceAPIServiceStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceAPIServiceStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1APIService")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIService");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.ApiregistrationV1Api = ApiregistrationV1Api;
//# sourceMappingURL=apiregistrationV1Api.js.map
/***/ }),
/***/ 25997:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.APIS = exports.HttpError = void 0;
const tslib_1 = __nccwpck_require__(4351);
tslib_1.__exportStar(__nccwpck_require__(79893), exports);
const admissionregistrationApi_1 = __nccwpck_require__(79893);
tslib_1.__exportStar(__nccwpck_require__(69218), exports);
const admissionregistrationV1Api_1 = __nccwpck_require__(69218);
tslib_1.__exportStar(__nccwpck_require__(67758), exports);
const apiextensionsApi_1 = __nccwpck_require__(67758);
tslib_1.__exportStar(__nccwpck_require__(91294), exports);
const apiextensionsV1Api_1 = __nccwpck_require__(91294);
tslib_1.__exportStar(__nccwpck_require__(99722), exports);
const apiregistrationApi_1 = __nccwpck_require__(99722);
tslib_1.__exportStar(__nccwpck_require__(99365), exports);
const apiregistrationV1Api_1 = __nccwpck_require__(99365);
tslib_1.__exportStar(__nccwpck_require__(59536), exports);
const apisApi_1 = __nccwpck_require__(59536);
tslib_1.__exportStar(__nccwpck_require__(99869), exports);
const appsApi_1 = __nccwpck_require__(99869);
tslib_1.__exportStar(__nccwpck_require__(10588), exports);
const appsV1Api_1 = __nccwpck_require__(10588);
tslib_1.__exportStar(__nccwpck_require__(61226), exports);
const authenticationApi_1 = __nccwpck_require__(61226);
tslib_1.__exportStar(__nccwpck_require__(17421), exports);
const authenticationV1Api_1 = __nccwpck_require__(17421);
tslib_1.__exportStar(__nccwpck_require__(75154), exports);
const authorizationApi_1 = __nccwpck_require__(75154);
tslib_1.__exportStar(__nccwpck_require__(97999), exports);
const authorizationV1Api_1 = __nccwpck_require__(97999);
tslib_1.__exportStar(__nccwpck_require__(94692), exports);
const autoscalingApi_1 = __nccwpck_require__(94692);
tslib_1.__exportStar(__nccwpck_require__(47098), exports);
const autoscalingV1Api_1 = __nccwpck_require__(47098);
tslib_1.__exportStar(__nccwpck_require__(15872), exports);
const autoscalingV2beta1Api_1 = __nccwpck_require__(15872);
tslib_1.__exportStar(__nccwpck_require__(76982), exports);
const autoscalingV2beta2Api_1 = __nccwpck_require__(76982);
tslib_1.__exportStar(__nccwpck_require__(91445), exports);
const batchApi_1 = __nccwpck_require__(91445);
tslib_1.__exportStar(__nccwpck_require__(78246), exports);
const batchV1Api_1 = __nccwpck_require__(78246);
tslib_1.__exportStar(__nccwpck_require__(71101), exports);
const batchV1beta1Api_1 = __nccwpck_require__(71101);
tslib_1.__exportStar(__nccwpck_require__(92076), exports);
const certificatesApi_1 = __nccwpck_require__(92076);
tslib_1.__exportStar(__nccwpck_require__(32593), exports);
const certificatesV1Api_1 = __nccwpck_require__(32593);
tslib_1.__exportStar(__nccwpck_require__(69209), exports);
const coordinationApi_1 = __nccwpck_require__(69209);
tslib_1.__exportStar(__nccwpck_require__(52653), exports);
const coordinationV1Api_1 = __nccwpck_require__(52653);
tslib_1.__exportStar(__nccwpck_require__(51489), exports);
const coreApi_1 = __nccwpck_require__(51489);
tslib_1.__exportStar(__nccwpck_require__(4738), exports);
const coreV1Api_1 = __nccwpck_require__(4738);
tslib_1.__exportStar(__nccwpck_require__(36522), exports);
const customObjectsApi_1 = __nccwpck_require__(36522);
tslib_1.__exportStar(__nccwpck_require__(44310), exports);
const discoveryApi_1 = __nccwpck_require__(44310);
tslib_1.__exportStar(__nccwpck_require__(9089), exports);
const discoveryV1Api_1 = __nccwpck_require__(9089);
tslib_1.__exportStar(__nccwpck_require__(10420), exports);
const discoveryV1beta1Api_1 = __nccwpck_require__(10420);
tslib_1.__exportStar(__nccwpck_require__(89829), exports);
const eventsApi_1 = __nccwpck_require__(89829);
tslib_1.__exportStar(__nccwpck_require__(15621), exports);
const eventsV1Api_1 = __nccwpck_require__(15621);
tslib_1.__exportStar(__nccwpck_require__(5821), exports);
const eventsV1beta1Api_1 = __nccwpck_require__(5821);
tslib_1.__exportStar(__nccwpck_require__(16001), exports);
const flowcontrolApiserverApi_1 = __nccwpck_require__(16001);
tslib_1.__exportStar(__nccwpck_require__(58365), exports);
const flowcontrolApiserverV1beta1Api_1 = __nccwpck_require__(58365);
tslib_1.__exportStar(__nccwpck_require__(31857), exports);
const internalApiserverApi_1 = __nccwpck_require__(31857);
tslib_1.__exportStar(__nccwpck_require__(76012), exports);
const internalApiserverV1alpha1Api_1 = __nccwpck_require__(76012);
tslib_1.__exportStar(__nccwpck_require__(88382), exports);
const logsApi_1 = __nccwpck_require__(88382);
tslib_1.__exportStar(__nccwpck_require__(48169), exports);
const networkingApi_1 = __nccwpck_require__(48169);
tslib_1.__exportStar(__nccwpck_require__(97534), exports);
const networkingV1Api_1 = __nccwpck_require__(97534);
tslib_1.__exportStar(__nccwpck_require__(31466), exports);
const nodeApi_1 = __nccwpck_require__(31466);
tslib_1.__exportStar(__nccwpck_require__(9090), exports);
const nodeV1Api_1 = __nccwpck_require__(9090);
tslib_1.__exportStar(__nccwpck_require__(17374), exports);
const nodeV1alpha1Api_1 = __nccwpck_require__(17374);
tslib_1.__exportStar(__nccwpck_require__(78504), exports);
const nodeV1beta1Api_1 = __nccwpck_require__(78504);
tslib_1.__exportStar(__nccwpck_require__(5381), exports);
const openidApi_1 = __nccwpck_require__(5381);
tslib_1.__exportStar(__nccwpck_require__(37284), exports);
const policyApi_1 = __nccwpck_require__(37284);
tslib_1.__exportStar(__nccwpck_require__(87307), exports);
const policyV1Api_1 = __nccwpck_require__(87307);
tslib_1.__exportStar(__nccwpck_require__(80228), exports);
const policyV1beta1Api_1 = __nccwpck_require__(80228);
tslib_1.__exportStar(__nccwpck_require__(73316), exports);
const rbacAuthorizationApi_1 = __nccwpck_require__(73316);
tslib_1.__exportStar(__nccwpck_require__(93149), exports);
const rbacAuthorizationV1Api_1 = __nccwpck_require__(93149);
tslib_1.__exportStar(__nccwpck_require__(44056), exports);
const rbacAuthorizationV1alpha1Api_1 = __nccwpck_require__(44056);
tslib_1.__exportStar(__nccwpck_require__(29389), exports);
const schedulingApi_1 = __nccwpck_require__(29389);
tslib_1.__exportStar(__nccwpck_require__(26757), exports);
const schedulingV1Api_1 = __nccwpck_require__(26757);
tslib_1.__exportStar(__nccwpck_require__(91655), exports);
const schedulingV1alpha1Api_1 = __nccwpck_require__(91655);
tslib_1.__exportStar(__nccwpck_require__(91143), exports);
const storageApi_1 = __nccwpck_require__(91143);
tslib_1.__exportStar(__nccwpck_require__(922), exports);
const storageV1Api_1 = __nccwpck_require__(922);
tslib_1.__exportStar(__nccwpck_require__(30769), exports);
const storageV1alpha1Api_1 = __nccwpck_require__(30769);
tslib_1.__exportStar(__nccwpck_require__(73491), exports);
const storageV1beta1Api_1 = __nccwpck_require__(73491);
tslib_1.__exportStar(__nccwpck_require__(4441), exports);
const versionApi_1 = __nccwpck_require__(4441);
tslib_1.__exportStar(__nccwpck_require__(19868), exports);
const wellKnownApi_1 = __nccwpck_require__(19868);
class HttpError extends Error {
constructor(response, body, statusCode) {
super('HTTP request failed');
this.response = response;
this.body = body;
this.statusCode = statusCode;
this.name = 'HttpError';
}
}
exports.HttpError = HttpError;
exports.APIS = [admissionregistrationApi_1.AdmissionregistrationApi, admissionregistrationV1Api_1.AdmissionregistrationV1Api, apiextensionsApi_1.ApiextensionsApi, apiextensionsV1Api_1.ApiextensionsV1Api, apiregistrationApi_1.ApiregistrationApi, apiregistrationV1Api_1.ApiregistrationV1Api, apisApi_1.ApisApi, appsApi_1.AppsApi, appsV1Api_1.AppsV1Api, authenticationApi_1.AuthenticationApi, authenticationV1Api_1.AuthenticationV1Api, authorizationApi_1.AuthorizationApi, authorizationV1Api_1.AuthorizationV1Api, autoscalingApi_1.AutoscalingApi, autoscalingV1Api_1.AutoscalingV1Api, autoscalingV2beta1Api_1.AutoscalingV2beta1Api, autoscalingV2beta2Api_1.AutoscalingV2beta2Api, batchApi_1.BatchApi, batchV1Api_1.BatchV1Api, batchV1beta1Api_1.BatchV1beta1Api, certificatesApi_1.CertificatesApi, certificatesV1Api_1.CertificatesV1Api, coordinationApi_1.CoordinationApi, coordinationV1Api_1.CoordinationV1Api, coreApi_1.CoreApi, coreV1Api_1.CoreV1Api, customObjectsApi_1.CustomObjectsApi, discoveryApi_1.DiscoveryApi, discoveryV1Api_1.DiscoveryV1Api, discoveryV1beta1Api_1.DiscoveryV1beta1Api, eventsApi_1.EventsApi, eventsV1Api_1.EventsV1Api, eventsV1beta1Api_1.EventsV1beta1Api, flowcontrolApiserverApi_1.FlowcontrolApiserverApi, flowcontrolApiserverV1beta1Api_1.FlowcontrolApiserverV1beta1Api, internalApiserverApi_1.InternalApiserverApi, internalApiserverV1alpha1Api_1.InternalApiserverV1alpha1Api, logsApi_1.LogsApi, networkingApi_1.NetworkingApi, networkingV1Api_1.NetworkingV1Api, nodeApi_1.NodeApi, nodeV1Api_1.NodeV1Api, nodeV1alpha1Api_1.NodeV1alpha1Api, nodeV1beta1Api_1.NodeV1beta1Api, openidApi_1.OpenidApi, policyApi_1.PolicyApi, policyV1Api_1.PolicyV1Api, policyV1beta1Api_1.PolicyV1beta1Api, rbacAuthorizationApi_1.RbacAuthorizationApi, rbacAuthorizationV1Api_1.RbacAuthorizationV1Api, rbacAuthorizationV1alpha1Api_1.RbacAuthorizationV1alpha1Api, schedulingApi_1.SchedulingApi, schedulingV1Api_1.SchedulingV1Api, schedulingV1alpha1Api_1.SchedulingV1alpha1Api, storageApi_1.StorageApi, storageV1Api_1.StorageV1Api, storageV1alpha1Api_1.StorageV1alpha1Api, storageV1beta1Api_1.StorageV1beta1Api, versionApi_1.VersionApi, wellKnownApi_1.WellKnownApi];
//# sourceMappingURL=apis.js.map
/***/ }),
/***/ 59536:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.ApisApi = exports.ApisApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(4351);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var ApisApiApiKeys;
(function (ApisApiApiKeys) {
ApisApiApiKeys[ApisApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(ApisApiApiKeys = exports.ApisApiApiKeys || (exports.ApisApiApiKeys = {}));
class ApisApi {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[ApisApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* get available API versions
*/
async getAPIVersions(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIGroupList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.ApisApi = ApisApi;
//# sourceMappingURL=apisApi.js.map
/***/ }),
/***/ 99869:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.AppsApi = exports.AppsApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(4351);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var AppsApiApiKeys;
(function (AppsApiApiKeys) {
AppsApiApiKeys[AppsApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(AppsApiApiKeys = exports.AppsApiApiKeys || (exports.AppsApiApiKeys = {}));
class AppsApi {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[AppsApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* get information of a group
*/
async getAPIGroup(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIGroup");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.AppsApi = AppsApi;
//# sourceMappingURL=appsApi.js.map
/***/ }),
/***/ 10588:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.AppsV1Api = exports.AppsV1ApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(4351);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var AppsV1ApiApiKeys;
(function (AppsV1ApiApiKeys) {
AppsV1ApiApiKeys[AppsV1ApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(AppsV1ApiApiKeys = exports.AppsV1ApiApiKeys || (exports.AppsV1ApiApiKeys = {}));
class AppsV1Api {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[AppsV1ApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* create a ControllerRevision
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createNamespacedControllerRevision(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/controllerrevisions'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling createNamespacedControllerRevision.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createNamespacedControllerRevision.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1ControllerRevision")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ControllerRevision");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* create a DaemonSet
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createNamespacedDaemonSet(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/daemonsets'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling createNamespacedDaemonSet.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createNamespacedDaemonSet.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DaemonSet")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1DaemonSet");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* create a Deployment
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createNamespacedDeployment(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/deployments'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling createNamespacedDeployment.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createNamespacedDeployment.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1Deployment")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Deployment");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* create a ReplicaSet
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createNamespacedReplicaSet(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/replicasets'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling createNamespacedReplicaSet.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createNamespacedReplicaSet.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1ReplicaSet")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ReplicaSet");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* create a StatefulSet
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createNamespacedStatefulSet(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/statefulsets'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling createNamespacedStatefulSet.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createNamespacedStatefulSet.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1StatefulSet")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1StatefulSet");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of ControllerRevision
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionNamespacedControllerRevision(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/controllerrevisions'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedControllerRevision.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of DaemonSet
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionNamespacedDaemonSet(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/daemonsets'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedDaemonSet.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of Deployment
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionNamespacedDeployment(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/deployments'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedDeployment.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of ReplicaSet
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionNamespacedReplicaSet(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/replicasets'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedReplicaSet.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of StatefulSet
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionNamespacedStatefulSet(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/statefulsets'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedStatefulSet.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a ControllerRevision
* @param name name of the ControllerRevision
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param body
*/
async deleteNamespacedControllerRevision(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/controllerrevisions/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteNamespacedControllerRevision.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedControllerRevision.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a DaemonSet
* @param name name of the DaemonSet
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param body
*/
async deleteNamespacedDaemonSet(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/daemonsets/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteNamespacedDaemonSet.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedDaemonSet.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a Deployment
* @param name name of the Deployment
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param body
*/
async deleteNamespacedDeployment(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/deployments/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteNamespacedDeployment.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedDeployment.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a ReplicaSet
* @param name name of the ReplicaSet
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param body
*/
async deleteNamespacedReplicaSet(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/replicasets/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteNamespacedReplicaSet.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedReplicaSet.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a StatefulSet
* @param name name of the StatefulSet
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param body
*/
async deleteNamespacedStatefulSet(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteNamespacedStatefulSet.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedStatefulSet.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* get available resources
*/
async getAPIResources(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind ControllerRevision
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param pretty If \'true\', then the output is pretty printed.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listControllerRevisionForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/controllerrevisions';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ControllerRevisionList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind DaemonSet
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param pretty If \'true\', then the output is pretty printed.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listDaemonSetForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/daemonsets';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1DaemonSetList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind Deployment
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param pretty If \'true\', then the output is pretty printed.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listDeploymentForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/deployments';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1DeploymentList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind ControllerRevision
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listNamespacedControllerRevision(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/controllerrevisions'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling listNamespacedControllerRevision.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ControllerRevisionList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind DaemonSet
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listNamespacedDaemonSet(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/daemonsets'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling listNamespacedDaemonSet.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1DaemonSetList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind Deployment
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listNamespacedDeployment(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/deployments'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling listNamespacedDeployment.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1DeploymentList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind ReplicaSet
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listNamespacedReplicaSet(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/replicasets'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling listNamespacedReplicaSet.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ReplicaSetList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind StatefulSet
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listNamespacedStatefulSet(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/statefulsets'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling listNamespacedStatefulSet.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1StatefulSetList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind ReplicaSet
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param pretty If \'true\', then the output is pretty printed.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listReplicaSetForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/replicasets';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ReplicaSetList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind StatefulSet
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param pretty If \'true\', then the output is pretty printed.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listStatefulSetForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/statefulsets';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1StatefulSetList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified ControllerRevision
* @param name name of the ControllerRevision
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedControllerRevision(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/controllerrevisions/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedControllerRevision.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedControllerRevision.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedControllerRevision.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ControllerRevision");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified DaemonSet
* @param name name of the DaemonSet
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedDaemonSet(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/daemonsets/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedDaemonSet.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedDaemonSet.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedDaemonSet.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1DaemonSet");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update status of the specified DaemonSet
* @param name name of the DaemonSet
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedDaemonSetStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/daemonsets/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedDaemonSetStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedDaemonSetStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedDaemonSetStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1DaemonSet");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified Deployment
* @param name name of the Deployment
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedDeployment(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/deployments/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedDeployment.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedDeployment.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedDeployment.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Deployment");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update scale of the specified Deployment
* @param name name of the Scale
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedDeploymentScale(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/deployments/{name}/scale'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedDeploymentScale.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedDeploymentScale.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedDeploymentScale.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Scale");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update status of the specified Deployment
* @param name name of the Deployment
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedDeploymentStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/deployments/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedDeploymentStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedDeploymentStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedDeploymentStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Deployment");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified ReplicaSet
* @param name name of the ReplicaSet
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedReplicaSet(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/replicasets/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedReplicaSet.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedReplicaSet.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedReplicaSet.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ReplicaSet");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update scale of the specified ReplicaSet
* @param name name of the Scale
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedReplicaSetScale(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/replicasets/{name}/scale'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedReplicaSetScale.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedReplicaSetScale.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedReplicaSetScale.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Scale");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update status of the specified ReplicaSet
* @param name name of the ReplicaSet
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedReplicaSetStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/replicasets/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedReplicaSetStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedReplicaSetStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedReplicaSetStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ReplicaSet");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified StatefulSet
* @param name name of the StatefulSet
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedStatefulSet(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedStatefulSet.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedStatefulSet.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedStatefulSet.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1StatefulSet");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update scale of the specified StatefulSet
* @param name name of the Scale
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedStatefulSetScale(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/scale'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedStatefulSetScale.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedStatefulSetScale.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedStatefulSetScale.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Scale");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update status of the specified StatefulSet
* @param name name of the StatefulSet
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedStatefulSetStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedStatefulSetStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedStatefulSetStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedStatefulSetStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1StatefulSet");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified ControllerRevision
* @param name name of the ControllerRevision
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedControllerRevision(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/controllerrevisions/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedControllerRevision.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedControllerRevision.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ControllerRevision");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified DaemonSet
* @param name name of the DaemonSet
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedDaemonSet(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/daemonsets/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedDaemonSet.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedDaemonSet.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1DaemonSet");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read status of the specified DaemonSet
* @param name name of the DaemonSet
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedDaemonSetStatus(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/daemonsets/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedDaemonSetStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedDaemonSetStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1DaemonSet");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified Deployment
* @param name name of the Deployment
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedDeployment(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/deployments/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedDeployment.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedDeployment.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Deployment");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read scale of the specified Deployment
* @param name name of the Scale
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedDeploymentScale(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/deployments/{name}/scale'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedDeploymentScale.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedDeploymentScale.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Scale");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read status of the specified Deployment
* @param name name of the Deployment
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedDeploymentStatus(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/deployments/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedDeploymentStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedDeploymentStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Deployment");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified ReplicaSet
* @param name name of the ReplicaSet
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedReplicaSet(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/replicasets/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedReplicaSet.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedReplicaSet.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ReplicaSet");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read scale of the specified ReplicaSet
* @param name name of the Scale
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedReplicaSetScale(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/replicasets/{name}/scale'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedReplicaSetScale.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedReplicaSetScale.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Scale");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read status of the specified ReplicaSet
* @param name name of the ReplicaSet
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedReplicaSetStatus(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/replicasets/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedReplicaSetStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedReplicaSetStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ReplicaSet");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified StatefulSet
* @param name name of the StatefulSet
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedStatefulSet(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedStatefulSet.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedStatefulSet.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1StatefulSet");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read scale of the specified StatefulSet
* @param name name of the Scale
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedStatefulSetScale(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/scale'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedStatefulSetScale.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedStatefulSetScale.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Scale");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read status of the specified StatefulSet
* @param name name of the StatefulSet
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedStatefulSetStatus(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedStatefulSetStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedStatefulSetStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1StatefulSet");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified ControllerRevision
* @param name name of the ControllerRevision
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedControllerRevision(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/controllerrevisions/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedControllerRevision.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedControllerRevision.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedControllerRevision.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1ControllerRevision")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ControllerRevision");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified DaemonSet
* @param name name of the DaemonSet
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedDaemonSet(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/daemonsets/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedDaemonSet.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedDaemonSet.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedDaemonSet.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DaemonSet")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1DaemonSet");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace status of the specified DaemonSet
* @param name name of the DaemonSet
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedDaemonSetStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/daemonsets/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedDaemonSetStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedDaemonSetStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedDaemonSetStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DaemonSet")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1DaemonSet");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified Deployment
* @param name name of the Deployment
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedDeployment(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/deployments/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedDeployment.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedDeployment.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedDeployment.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1Deployment")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Deployment");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace scale of the specified Deployment
* @param name name of the Scale
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedDeploymentScale(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/deployments/{name}/scale'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedDeploymentScale.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedDeploymentScale.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedDeploymentScale.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1Scale")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Scale");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace status of the specified Deployment
* @param name name of the Deployment
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedDeploymentStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/deployments/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedDeploymentStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedDeploymentStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedDeploymentStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1Deployment")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Deployment");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified ReplicaSet
* @param name name of the ReplicaSet
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedReplicaSet(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/replicasets/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedReplicaSet.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedReplicaSet.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedReplicaSet.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1ReplicaSet")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ReplicaSet");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace scale of the specified ReplicaSet
* @param name name of the Scale
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedReplicaSetScale(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/replicasets/{name}/scale'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedReplicaSetScale.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedReplicaSetScale.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedReplicaSetScale.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1Scale")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Scale");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace status of the specified ReplicaSet
* @param name name of the ReplicaSet
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedReplicaSetStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/replicasets/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedReplicaSetStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedReplicaSetStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedReplicaSetStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1ReplicaSet")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ReplicaSet");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified StatefulSet
* @param name name of the StatefulSet
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedStatefulSet(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedStatefulSet.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedStatefulSet.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedStatefulSet.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1StatefulSet")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1StatefulSet");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace scale of the specified StatefulSet
* @param name name of the Scale
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedStatefulSetScale(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/scale'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedStatefulSetScale.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedStatefulSetScale.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedStatefulSetScale.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1Scale")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Scale");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace status of the specified StatefulSet
* @param name name of the StatefulSet
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedStatefulSetStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedStatefulSetStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedStatefulSetStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedStatefulSetStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1StatefulSet")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1StatefulSet");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.AppsV1Api = AppsV1Api;
//# sourceMappingURL=appsV1Api.js.map
/***/ }),
/***/ 61226:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.AuthenticationApi = exports.AuthenticationApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(4351);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var AuthenticationApiApiKeys;
(function (AuthenticationApiApiKeys) {
AuthenticationApiApiKeys[AuthenticationApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(AuthenticationApiApiKeys = exports.AuthenticationApiApiKeys || (exports.AuthenticationApiApiKeys = {}));
class AuthenticationApi {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[AuthenticationApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* get information of a group
*/
async getAPIGroup(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/authentication.k8s.io/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIGroup");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.AuthenticationApi = AuthenticationApi;
//# sourceMappingURL=authenticationApi.js.map
/***/ }),
/***/ 17421:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.AuthenticationV1Api = exports.AuthenticationV1ApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(4351);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var AuthenticationV1ApiApiKeys;
(function (AuthenticationV1ApiApiKeys) {
AuthenticationV1ApiApiKeys[AuthenticationV1ApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(AuthenticationV1ApiApiKeys = exports.AuthenticationV1ApiApiKeys || (exports.AuthenticationV1ApiApiKeys = {}));
class AuthenticationV1Api {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[AuthenticationV1ApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* create a TokenReview
* @param body
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
* @param pretty If \'true\', then the output is pretty printed.
*/
async createTokenReview(body, dryRun, fieldManager, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/authentication.k8s.io/v1/tokenreviews';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createTokenReview.');
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1TokenReview")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1TokenReview");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* get available resources
*/
async getAPIResources(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/authentication.k8s.io/v1/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.AuthenticationV1Api = AuthenticationV1Api;
//# sourceMappingURL=authenticationV1Api.js.map
/***/ }),
/***/ 75154:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.AuthorizationApi = exports.AuthorizationApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(4351);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var AuthorizationApiApiKeys;
(function (AuthorizationApiApiKeys) {
AuthorizationApiApiKeys[AuthorizationApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(AuthorizationApiApiKeys = exports.AuthorizationApiApiKeys || (exports.AuthorizationApiApiKeys = {}));
class AuthorizationApi {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[AuthorizationApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* get information of a group
*/
async getAPIGroup(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/authorization.k8s.io/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIGroup");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.AuthorizationApi = AuthorizationApi;
//# sourceMappingURL=authorizationApi.js.map
/***/ }),
/***/ 97999:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.AuthorizationV1Api = exports.AuthorizationV1ApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(4351);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var AuthorizationV1ApiApiKeys;
(function (AuthorizationV1ApiApiKeys) {
AuthorizationV1ApiApiKeys[AuthorizationV1ApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(AuthorizationV1ApiApiKeys = exports.AuthorizationV1ApiApiKeys || (exports.AuthorizationV1ApiApiKeys = {}));
class AuthorizationV1Api {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[AuthorizationV1ApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* create a LocalSubjectAccessReview
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
* @param pretty If \'true\', then the output is pretty printed.
*/
async createNamespacedLocalSubjectAccessReview(namespace, body, dryRun, fieldManager, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/authorization.k8s.io/v1/namespaces/{namespace}/localsubjectaccessreviews'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling createNamespacedLocalSubjectAccessReview.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createNamespacedLocalSubjectAccessReview.');
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1LocalSubjectAccessReview")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1LocalSubjectAccessReview");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* create a SelfSubjectAccessReview
* @param body
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
* @param pretty If \'true\', then the output is pretty printed.
*/
async createSelfSubjectAccessReview(body, dryRun, fieldManager, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/authorization.k8s.io/v1/selfsubjectaccessreviews';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createSelfSubjectAccessReview.');
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1SelfSubjectAccessReview")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1SelfSubjectAccessReview");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* create a SelfSubjectRulesReview
* @param body
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
* @param pretty If \'true\', then the output is pretty printed.
*/
async createSelfSubjectRulesReview(body, dryRun, fieldManager, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/authorization.k8s.io/v1/selfsubjectrulesreviews';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createSelfSubjectRulesReview.');
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1SelfSubjectRulesReview")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1SelfSubjectRulesReview");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* create a SubjectAccessReview
* @param body
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
* @param pretty If \'true\', then the output is pretty printed.
*/
async createSubjectAccessReview(body, dryRun, fieldManager, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/authorization.k8s.io/v1/subjectaccessreviews';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createSubjectAccessReview.');
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1SubjectAccessReview")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1SubjectAccessReview");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* get available resources
*/
async getAPIResources(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/authorization.k8s.io/v1/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.AuthorizationV1Api = AuthorizationV1Api;
//# sourceMappingURL=authorizationV1Api.js.map
/***/ }),
/***/ 94692:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.AutoscalingApi = exports.AutoscalingApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(4351);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var AutoscalingApiApiKeys;
(function (AutoscalingApiApiKeys) {
AutoscalingApiApiKeys[AutoscalingApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(AutoscalingApiApiKeys = exports.AutoscalingApiApiKeys || (exports.AutoscalingApiApiKeys = {}));
class AutoscalingApi {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[AutoscalingApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* get information of a group
*/
async getAPIGroup(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/autoscaling/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIGroup");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.AutoscalingApi = AutoscalingApi;
//# sourceMappingURL=autoscalingApi.js.map
/***/ }),
/***/ 47098:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.AutoscalingV1Api = exports.AutoscalingV1ApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(4351);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var AutoscalingV1ApiApiKeys;
(function (AutoscalingV1ApiApiKeys) {
AutoscalingV1ApiApiKeys[AutoscalingV1ApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(AutoscalingV1ApiApiKeys = exports.AutoscalingV1ApiApiKeys || (exports.AutoscalingV1ApiApiKeys = {}));
class AutoscalingV1Api {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[AutoscalingV1ApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* create a HorizontalPodAutoscaler
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createNamespacedHorizontalPodAutoscaler(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling createNamespacedHorizontalPodAutoscaler.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createNamespacedHorizontalPodAutoscaler.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1HorizontalPodAutoscaler")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1HorizontalPodAutoscaler");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of HorizontalPodAutoscaler
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionNamespacedHorizontalPodAutoscaler(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedHorizontalPodAutoscaler.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a HorizontalPodAutoscaler
* @param name name of the HorizontalPodAutoscaler
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param body
*/
async deleteNamespacedHorizontalPodAutoscaler(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteNamespacedHorizontalPodAutoscaler.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedHorizontalPodAutoscaler.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* get available resources
*/
async getAPIResources(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/autoscaling/v1/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind HorizontalPodAutoscaler
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param pretty If \'true\', then the output is pretty printed.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listHorizontalPodAutoscalerForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/autoscaling/v1/horizontalpodautoscalers';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1HorizontalPodAutoscalerList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind HorizontalPodAutoscaler
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listNamespacedHorizontalPodAutoscaler(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling listNamespacedHorizontalPodAutoscaler.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1HorizontalPodAutoscalerList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified HorizontalPodAutoscaler
* @param name name of the HorizontalPodAutoscaler
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedHorizontalPodAutoscaler(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedHorizontalPodAutoscaler.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedHorizontalPodAutoscaler.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedHorizontalPodAutoscaler.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1HorizontalPodAutoscaler");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update status of the specified HorizontalPodAutoscaler
* @param name name of the HorizontalPodAutoscaler
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedHorizontalPodAutoscalerStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedHorizontalPodAutoscalerStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedHorizontalPodAutoscalerStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedHorizontalPodAutoscalerStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1HorizontalPodAutoscaler");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified HorizontalPodAutoscaler
* @param name name of the HorizontalPodAutoscaler
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedHorizontalPodAutoscaler(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedHorizontalPodAutoscaler.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedHorizontalPodAutoscaler.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1HorizontalPodAutoscaler");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read status of the specified HorizontalPodAutoscaler
* @param name name of the HorizontalPodAutoscaler
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedHorizontalPodAutoscalerStatus(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedHorizontalPodAutoscalerStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedHorizontalPodAutoscalerStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1HorizontalPodAutoscaler");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified HorizontalPodAutoscaler
* @param name name of the HorizontalPodAutoscaler
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedHorizontalPodAutoscaler(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedHorizontalPodAutoscaler.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedHorizontalPodAutoscaler.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedHorizontalPodAutoscaler.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1HorizontalPodAutoscaler")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1HorizontalPodAutoscaler");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace status of the specified HorizontalPodAutoscaler
* @param name name of the HorizontalPodAutoscaler
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedHorizontalPodAutoscalerStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedHorizontalPodAutoscalerStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedHorizontalPodAutoscalerStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedHorizontalPodAutoscalerStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1HorizontalPodAutoscaler")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1HorizontalPodAutoscaler");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.AutoscalingV1Api = AutoscalingV1Api;
//# sourceMappingURL=autoscalingV1Api.js.map
/***/ }),
/***/ 15872:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.AutoscalingV2beta1Api = exports.AutoscalingV2beta1ApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(4351);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var AutoscalingV2beta1ApiApiKeys;
(function (AutoscalingV2beta1ApiApiKeys) {
AutoscalingV2beta1ApiApiKeys[AutoscalingV2beta1ApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(AutoscalingV2beta1ApiApiKeys = exports.AutoscalingV2beta1ApiApiKeys || (exports.AutoscalingV2beta1ApiApiKeys = {}));
class AutoscalingV2beta1Api {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[AutoscalingV2beta1ApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* create a HorizontalPodAutoscaler
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createNamespacedHorizontalPodAutoscaler(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/autoscaling/v2beta1/namespaces/{namespace}/horizontalpodautoscalers'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling createNamespacedHorizontalPodAutoscaler.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createNamespacedHorizontalPodAutoscaler.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V2beta1HorizontalPodAutoscaler")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V2beta1HorizontalPodAutoscaler");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of HorizontalPodAutoscaler
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionNamespacedHorizontalPodAutoscaler(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/autoscaling/v2beta1/namespaces/{namespace}/horizontalpodautoscalers'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedHorizontalPodAutoscaler.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a HorizontalPodAutoscaler
* @param name name of the HorizontalPodAutoscaler
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param body
*/
async deleteNamespacedHorizontalPodAutoscaler(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/autoscaling/v2beta1/namespaces/{namespace}/horizontalpodautoscalers/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteNamespacedHorizontalPodAutoscaler.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedHorizontalPodAutoscaler.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* get available resources
*/
async getAPIResources(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/autoscaling/v2beta1/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind HorizontalPodAutoscaler
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param pretty If \'true\', then the output is pretty printed.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listHorizontalPodAutoscalerForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/autoscaling/v2beta1/horizontalpodautoscalers';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V2beta1HorizontalPodAutoscalerList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind HorizontalPodAutoscaler
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listNamespacedHorizontalPodAutoscaler(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/autoscaling/v2beta1/namespaces/{namespace}/horizontalpodautoscalers'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling listNamespacedHorizontalPodAutoscaler.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V2beta1HorizontalPodAutoscalerList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified HorizontalPodAutoscaler
* @param name name of the HorizontalPodAutoscaler
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedHorizontalPodAutoscaler(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/autoscaling/v2beta1/namespaces/{namespace}/horizontalpodautoscalers/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedHorizontalPodAutoscaler.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedHorizontalPodAutoscaler.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedHorizontalPodAutoscaler.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V2beta1HorizontalPodAutoscaler");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update status of the specified HorizontalPodAutoscaler
* @param name name of the HorizontalPodAutoscaler
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedHorizontalPodAutoscalerStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/autoscaling/v2beta1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedHorizontalPodAutoscalerStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedHorizontalPodAutoscalerStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedHorizontalPodAutoscalerStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V2beta1HorizontalPodAutoscaler");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified HorizontalPodAutoscaler
* @param name name of the HorizontalPodAutoscaler
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedHorizontalPodAutoscaler(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/autoscaling/v2beta1/namespaces/{namespace}/horizontalpodautoscalers/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedHorizontalPodAutoscaler.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedHorizontalPodAutoscaler.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V2beta1HorizontalPodAutoscaler");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read status of the specified HorizontalPodAutoscaler
* @param name name of the HorizontalPodAutoscaler
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedHorizontalPodAutoscalerStatus(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/autoscaling/v2beta1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedHorizontalPodAutoscalerStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedHorizontalPodAutoscalerStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V2beta1HorizontalPodAutoscaler");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified HorizontalPodAutoscaler
* @param name name of the HorizontalPodAutoscaler
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedHorizontalPodAutoscaler(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/autoscaling/v2beta1/namespaces/{namespace}/horizontalpodautoscalers/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedHorizontalPodAutoscaler.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedHorizontalPodAutoscaler.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedHorizontalPodAutoscaler.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V2beta1HorizontalPodAutoscaler")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V2beta1HorizontalPodAutoscaler");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace status of the specified HorizontalPodAutoscaler
* @param name name of the HorizontalPodAutoscaler
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedHorizontalPodAutoscalerStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/autoscaling/v2beta1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedHorizontalPodAutoscalerStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedHorizontalPodAutoscalerStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedHorizontalPodAutoscalerStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V2beta1HorizontalPodAutoscaler")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V2beta1HorizontalPodAutoscaler");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.AutoscalingV2beta1Api = AutoscalingV2beta1Api;
//# sourceMappingURL=autoscalingV2beta1Api.js.map
/***/ }),
/***/ 76982:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.AutoscalingV2beta2Api = exports.AutoscalingV2beta2ApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(4351);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var AutoscalingV2beta2ApiApiKeys;
(function (AutoscalingV2beta2ApiApiKeys) {
AutoscalingV2beta2ApiApiKeys[AutoscalingV2beta2ApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(AutoscalingV2beta2ApiApiKeys = exports.AutoscalingV2beta2ApiApiKeys || (exports.AutoscalingV2beta2ApiApiKeys = {}));
class AutoscalingV2beta2Api {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[AutoscalingV2beta2ApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* create a HorizontalPodAutoscaler
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createNamespacedHorizontalPodAutoscaler(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/autoscaling/v2beta2/namespaces/{namespace}/horizontalpodautoscalers'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling createNamespacedHorizontalPodAutoscaler.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createNamespacedHorizontalPodAutoscaler.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V2beta2HorizontalPodAutoscaler")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V2beta2HorizontalPodAutoscaler");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of HorizontalPodAutoscaler
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionNamespacedHorizontalPodAutoscaler(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/autoscaling/v2beta2/namespaces/{namespace}/horizontalpodautoscalers'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedHorizontalPodAutoscaler.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a HorizontalPodAutoscaler
* @param name name of the HorizontalPodAutoscaler
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param body
*/
async deleteNamespacedHorizontalPodAutoscaler(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/autoscaling/v2beta2/namespaces/{namespace}/horizontalpodautoscalers/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteNamespacedHorizontalPodAutoscaler.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedHorizontalPodAutoscaler.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* get available resources
*/
async getAPIResources(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/autoscaling/v2beta2/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind HorizontalPodAutoscaler
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param pretty If \'true\', then the output is pretty printed.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listHorizontalPodAutoscalerForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/autoscaling/v2beta2/horizontalpodautoscalers';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V2beta2HorizontalPodAutoscalerList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind HorizontalPodAutoscaler
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listNamespacedHorizontalPodAutoscaler(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/autoscaling/v2beta2/namespaces/{namespace}/horizontalpodautoscalers'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling listNamespacedHorizontalPodAutoscaler.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V2beta2HorizontalPodAutoscalerList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified HorizontalPodAutoscaler
* @param name name of the HorizontalPodAutoscaler
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedHorizontalPodAutoscaler(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/autoscaling/v2beta2/namespaces/{namespace}/horizontalpodautoscalers/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedHorizontalPodAutoscaler.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedHorizontalPodAutoscaler.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedHorizontalPodAutoscaler.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V2beta2HorizontalPodAutoscaler");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update status of the specified HorizontalPodAutoscaler
* @param name name of the HorizontalPodAutoscaler
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedHorizontalPodAutoscalerStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/autoscaling/v2beta2/namespaces/{namespace}/horizontalpodautoscalers/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedHorizontalPodAutoscalerStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedHorizontalPodAutoscalerStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedHorizontalPodAutoscalerStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V2beta2HorizontalPodAutoscaler");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified HorizontalPodAutoscaler
* @param name name of the HorizontalPodAutoscaler
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedHorizontalPodAutoscaler(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/autoscaling/v2beta2/namespaces/{namespace}/horizontalpodautoscalers/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedHorizontalPodAutoscaler.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedHorizontalPodAutoscaler.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V2beta2HorizontalPodAutoscaler");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read status of the specified HorizontalPodAutoscaler
* @param name name of the HorizontalPodAutoscaler
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedHorizontalPodAutoscalerStatus(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/autoscaling/v2beta2/namespaces/{namespace}/horizontalpodautoscalers/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedHorizontalPodAutoscalerStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedHorizontalPodAutoscalerStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V2beta2HorizontalPodAutoscaler");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified HorizontalPodAutoscaler
* @param name name of the HorizontalPodAutoscaler
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedHorizontalPodAutoscaler(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/autoscaling/v2beta2/namespaces/{namespace}/horizontalpodautoscalers/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedHorizontalPodAutoscaler.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedHorizontalPodAutoscaler.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedHorizontalPodAutoscaler.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V2beta2HorizontalPodAutoscaler")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V2beta2HorizontalPodAutoscaler");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace status of the specified HorizontalPodAutoscaler
* @param name name of the HorizontalPodAutoscaler
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedHorizontalPodAutoscalerStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/autoscaling/v2beta2/namespaces/{namespace}/horizontalpodautoscalers/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedHorizontalPodAutoscalerStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedHorizontalPodAutoscalerStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedHorizontalPodAutoscalerStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V2beta2HorizontalPodAutoscaler")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V2beta2HorizontalPodAutoscaler");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.AutoscalingV2beta2Api = AutoscalingV2beta2Api;
//# sourceMappingURL=autoscalingV2beta2Api.js.map
/***/ }),
/***/ 91445:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.BatchApi = exports.BatchApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(4351);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var BatchApiApiKeys;
(function (BatchApiApiKeys) {
BatchApiApiKeys[BatchApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(BatchApiApiKeys = exports.BatchApiApiKeys || (exports.BatchApiApiKeys = {}));
class BatchApi {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[BatchApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* get information of a group
*/
async getAPIGroup(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/batch/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIGroup");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.BatchApi = BatchApi;
//# sourceMappingURL=batchApi.js.map
/***/ }),
/***/ 78246:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.BatchV1Api = exports.BatchV1ApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(4351);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var BatchV1ApiApiKeys;
(function (BatchV1ApiApiKeys) {
BatchV1ApiApiKeys[BatchV1ApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(BatchV1ApiApiKeys = exports.BatchV1ApiApiKeys || (exports.BatchV1ApiApiKeys = {}));
class BatchV1Api {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[BatchV1ApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* create a CronJob
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createNamespacedCronJob(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/cronjobs'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling createNamespacedCronJob.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createNamespacedCronJob.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1CronJob")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1CronJob");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* create a Job
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createNamespacedJob(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/jobs'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling createNamespacedJob.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createNamespacedJob.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1Job")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Job");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of CronJob
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionNamespacedCronJob(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/cronjobs'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedCronJob.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of Job
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionNamespacedJob(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/jobs'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedJob.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a CronJob
* @param name name of the CronJob
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param body
*/
async deleteNamespacedCronJob(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteNamespacedCronJob.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedCronJob.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a Job
* @param name name of the Job
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param body
*/
async deleteNamespacedJob(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/jobs/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteNamespacedJob.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedJob.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* get available resources
*/
async getAPIResources(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/batch/v1/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind CronJob
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param pretty If \'true\', then the output is pretty printed.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listCronJobForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/batch/v1/cronjobs';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1CronJobList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind Job
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param pretty If \'true\', then the output is pretty printed.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listJobForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/batch/v1/jobs';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1JobList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind CronJob
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listNamespacedCronJob(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/cronjobs'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling listNamespacedCronJob.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1CronJobList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind Job
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listNamespacedJob(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/jobs'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling listNamespacedJob.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1JobList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified CronJob
* @param name name of the CronJob
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedCronJob(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedCronJob.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedCronJob.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedCronJob.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1CronJob");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update status of the specified CronJob
* @param name name of the CronJob
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedCronJobStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedCronJobStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedCronJobStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedCronJobStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1CronJob");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified Job
* @param name name of the Job
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedJob(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/jobs/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedJob.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedJob.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedJob.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Job");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update status of the specified Job
* @param name name of the Job
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedJobStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/jobs/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedJobStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedJobStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedJobStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Job");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified CronJob
* @param name name of the CronJob
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedCronJob(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedCronJob.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedCronJob.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1CronJob");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read status of the specified CronJob
* @param name name of the CronJob
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedCronJobStatus(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedCronJobStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedCronJobStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1CronJob");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified Job
* @param name name of the Job
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedJob(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/jobs/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedJob.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedJob.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Job");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read status of the specified Job
* @param name name of the Job
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedJobStatus(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/jobs/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedJobStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedJobStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Job");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified CronJob
* @param name name of the CronJob
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedCronJob(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedCronJob.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedCronJob.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedCronJob.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1CronJob")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1CronJob");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace status of the specified CronJob
* @param name name of the CronJob
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedCronJobStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedCronJobStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedCronJobStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedCronJobStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1CronJob")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1CronJob");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified Job
* @param name name of the Job
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedJob(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/jobs/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedJob.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedJob.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedJob.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1Job")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Job");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace status of the specified Job
* @param name name of the Job
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedJobStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/jobs/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedJobStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedJobStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedJobStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1Job")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Job");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.BatchV1Api = BatchV1Api;
//# sourceMappingURL=batchV1Api.js.map
/***/ }),
/***/ 71101:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.BatchV1beta1Api = exports.BatchV1beta1ApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(4351);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var BatchV1beta1ApiApiKeys;
(function (BatchV1beta1ApiApiKeys) {
BatchV1beta1ApiApiKeys[BatchV1beta1ApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(BatchV1beta1ApiApiKeys = exports.BatchV1beta1ApiApiKeys || (exports.BatchV1beta1ApiApiKeys = {}));
class BatchV1beta1Api {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[BatchV1beta1ApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* create a CronJob
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createNamespacedCronJob(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/batch/v1beta1/namespaces/{namespace}/cronjobs'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling createNamespacedCronJob.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createNamespacedCronJob.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1beta1CronJob")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1CronJob");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of CronJob
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionNamespacedCronJob(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/batch/v1beta1/namespaces/{namespace}/cronjobs'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedCronJob.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a CronJob
* @param name name of the CronJob
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param body
*/
async deleteNamespacedCronJob(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/batch/v1beta1/namespaces/{namespace}/cronjobs/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteNamespacedCronJob.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedCronJob.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* get available resources
*/
async getAPIResources(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/batch/v1beta1/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind CronJob
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param pretty If \'true\', then the output is pretty printed.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listCronJobForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/batch/v1beta1/cronjobs';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1CronJobList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind CronJob
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listNamespacedCronJob(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/batch/v1beta1/namespaces/{namespace}/cronjobs'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling listNamespacedCronJob.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1CronJobList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified CronJob
* @param name name of the CronJob
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedCronJob(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/batch/v1beta1/namespaces/{namespace}/cronjobs/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedCronJob.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedCronJob.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedCronJob.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1CronJob");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update status of the specified CronJob
* @param name name of the CronJob
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedCronJobStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/batch/v1beta1/namespaces/{namespace}/cronjobs/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedCronJobStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedCronJobStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedCronJobStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1CronJob");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified CronJob
* @param name name of the CronJob
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedCronJob(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/batch/v1beta1/namespaces/{namespace}/cronjobs/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedCronJob.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedCronJob.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1CronJob");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read status of the specified CronJob
* @param name name of the CronJob
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedCronJobStatus(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/batch/v1beta1/namespaces/{namespace}/cronjobs/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedCronJobStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedCronJobStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1CronJob");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified CronJob
* @param name name of the CronJob
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedCronJob(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/batch/v1beta1/namespaces/{namespace}/cronjobs/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedCronJob.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedCronJob.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedCronJob.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1beta1CronJob")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1CronJob");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace status of the specified CronJob
* @param name name of the CronJob
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedCronJobStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/batch/v1beta1/namespaces/{namespace}/cronjobs/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedCronJobStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedCronJobStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedCronJobStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1beta1CronJob")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1CronJob");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.BatchV1beta1Api = BatchV1beta1Api;
//# sourceMappingURL=batchV1beta1Api.js.map
/***/ }),
/***/ 92076:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.CertificatesApi = exports.CertificatesApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(4351);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var CertificatesApiApiKeys;
(function (CertificatesApiApiKeys) {
CertificatesApiApiKeys[CertificatesApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(CertificatesApiApiKeys = exports.CertificatesApiApiKeys || (exports.CertificatesApiApiKeys = {}));
class CertificatesApi {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[CertificatesApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* get information of a group
*/
async getAPIGroup(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/certificates.k8s.io/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIGroup");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.CertificatesApi = CertificatesApi;
//# sourceMappingURL=certificatesApi.js.map
/***/ }),
/***/ 32593:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.CertificatesV1Api = exports.CertificatesV1ApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(4351);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var CertificatesV1ApiApiKeys;
(function (CertificatesV1ApiApiKeys) {
CertificatesV1ApiApiKeys[CertificatesV1ApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(CertificatesV1ApiApiKeys = exports.CertificatesV1ApiApiKeys || (exports.CertificatesV1ApiApiKeys = {}));
class CertificatesV1Api {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[CertificatesV1ApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* create a CertificateSigningRequest
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createCertificateSigningRequest(body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1/certificatesigningrequests';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createCertificateSigningRequest.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1CertificateSigningRequest")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1CertificateSigningRequest");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a CertificateSigningRequest
* @param name name of the CertificateSigningRequest
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param body
*/
async deleteCertificateSigningRequest(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteCertificateSigningRequest.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of CertificateSigningRequest
* @param pretty If \'true\', then the output is pretty printed.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionCertificateSigningRequest(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1/certificatesigningrequests';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* get available resources
*/
async getAPIResources(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind CertificateSigningRequest
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listCertificateSigningRequest(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1/certificatesigningrequests';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1CertificateSigningRequestList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified CertificateSigningRequest
* @param name name of the CertificateSigningRequest
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchCertificateSigningRequest(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchCertificateSigningRequest.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchCertificateSigningRequest.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1CertificateSigningRequest");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update approval of the specified CertificateSigningRequest
* @param name name of the CertificateSigningRequest
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchCertificateSigningRequestApproval(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}/approval'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchCertificateSigningRequestApproval.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchCertificateSigningRequestApproval.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1CertificateSigningRequest");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update status of the specified CertificateSigningRequest
* @param name name of the CertificateSigningRequest
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchCertificateSigningRequestStatus(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchCertificateSigningRequestStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchCertificateSigningRequestStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1CertificateSigningRequest");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified CertificateSigningRequest
* @param name name of the CertificateSigningRequest
* @param pretty If \'true\', then the output is pretty printed.
*/
async readCertificateSigningRequest(name, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readCertificateSigningRequest.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1CertificateSigningRequest");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read approval of the specified CertificateSigningRequest
* @param name name of the CertificateSigningRequest
* @param pretty If \'true\', then the output is pretty printed.
*/
async readCertificateSigningRequestApproval(name, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}/approval'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readCertificateSigningRequestApproval.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1CertificateSigningRequest");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read status of the specified CertificateSigningRequest
* @param name name of the CertificateSigningRequest
* @param pretty If \'true\', then the output is pretty printed.
*/
async readCertificateSigningRequestStatus(name, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readCertificateSigningRequestStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1CertificateSigningRequest");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified CertificateSigningRequest
* @param name name of the CertificateSigningRequest
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceCertificateSigningRequest(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceCertificateSigningRequest.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceCertificateSigningRequest.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1CertificateSigningRequest")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1CertificateSigningRequest");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace approval of the specified CertificateSigningRequest
* @param name name of the CertificateSigningRequest
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceCertificateSigningRequestApproval(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}/approval'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceCertificateSigningRequestApproval.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceCertificateSigningRequestApproval.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1CertificateSigningRequest")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1CertificateSigningRequest");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace status of the specified CertificateSigningRequest
* @param name name of the CertificateSigningRequest
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceCertificateSigningRequestStatus(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceCertificateSigningRequestStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceCertificateSigningRequestStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1CertificateSigningRequest")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1CertificateSigningRequest");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.CertificatesV1Api = CertificatesV1Api;
//# sourceMappingURL=certificatesV1Api.js.map
/***/ }),
/***/ 69209:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.CoordinationApi = exports.CoordinationApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(4351);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var CoordinationApiApiKeys;
(function (CoordinationApiApiKeys) {
CoordinationApiApiKeys[CoordinationApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(CoordinationApiApiKeys = exports.CoordinationApiApiKeys || (exports.CoordinationApiApiKeys = {}));
class CoordinationApi {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[CoordinationApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* get information of a group
*/
async getAPIGroup(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/coordination.k8s.io/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIGroup");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.CoordinationApi = CoordinationApi;
//# sourceMappingURL=coordinationApi.js.map
/***/ }),
/***/ 52653:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.CoordinationV1Api = exports.CoordinationV1ApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(4351);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var CoordinationV1ApiApiKeys;
(function (CoordinationV1ApiApiKeys) {
CoordinationV1ApiApiKeys[CoordinationV1ApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(CoordinationV1ApiApiKeys = exports.CoordinationV1ApiApiKeys || (exports.CoordinationV1ApiApiKeys = {}));
class CoordinationV1Api {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[CoordinationV1ApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* create a Lease
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createNamespacedLease(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/coordination.k8s.io/v1/namespaces/{namespace}/leases'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling createNamespacedLease.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createNamespacedLease.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1Lease")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Lease");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of Lease
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionNamespacedLease(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/coordination.k8s.io/v1/namespaces/{namespace}/leases'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedLease.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a Lease
* @param name name of the Lease
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param body
*/
async deleteNamespacedLease(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/coordination.k8s.io/v1/namespaces/{namespace}/leases/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteNamespacedLease.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedLease.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* get available resources
*/
async getAPIResources(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/coordination.k8s.io/v1/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind Lease
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param pretty If \'true\', then the output is pretty printed.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listLeaseForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/coordination.k8s.io/v1/leases';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1LeaseList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind Lease
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listNamespacedLease(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/coordination.k8s.io/v1/namespaces/{namespace}/leases'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling listNamespacedLease.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1LeaseList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified Lease
* @param name name of the Lease
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedLease(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/coordination.k8s.io/v1/namespaces/{namespace}/leases/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedLease.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedLease.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedLease.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Lease");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified Lease
* @param name name of the Lease
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedLease(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/coordination.k8s.io/v1/namespaces/{namespace}/leases/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedLease.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedLease.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Lease");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified Lease
* @param name name of the Lease
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedLease(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/coordination.k8s.io/v1/namespaces/{namespace}/leases/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedLease.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedLease.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedLease.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1Lease")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Lease");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.CoordinationV1Api = CoordinationV1Api;
//# sourceMappingURL=coordinationV1Api.js.map
/***/ }),
/***/ 51489:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.CoreApi = exports.CoreApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(4351);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var CoreApiApiKeys;
(function (CoreApiApiKeys) {
CoreApiApiKeys[CoreApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(CoreApiApiKeys = exports.CoreApiApiKeys || (exports.CoreApiApiKeys = {}));
class CoreApi {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[CoreApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* get available API versions
*/
async getAPIVersions(options = { headers: {} }) {
const localVarPath = this.basePath + '/api/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIVersions");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.CoreApi = CoreApi;
//# sourceMappingURL=coreApi.js.map
/***/ }),
/***/ 4738:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.CoreV1Api = exports.CoreV1ApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(4351);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var CoreV1ApiApiKeys;
(function (CoreV1ApiApiKeys) {
CoreV1ApiApiKeys[CoreV1ApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(CoreV1ApiApiKeys = exports.CoreV1ApiApiKeys || (exports.CoreV1ApiApiKeys = {}));
class CoreV1Api {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[CoreV1ApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* connect DELETE requests to proxy of Pod
* @param name name of the PodProxyOptions
* @param namespace object name and auth scope, such as for teams and projects
* @param path Path is the URL path to use for the current proxy request to pod.
*/
async connectDeleteNamespacedPodProxy(name, namespace, path, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/proxy'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['*/*'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling connectDeleteNamespacedPodProxy.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling connectDeleteNamespacedPodProxy.');
}
if (path !== undefined) {
localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* connect DELETE requests to proxy of Pod
* @param name name of the PodProxyOptions
* @param namespace object name and auth scope, such as for teams and projects
* @param path path to the resource
* @param path2 Path is the URL path to use for the current proxy request to pod.
*/
async connectDeleteNamespacedPodProxyWithPath(name, namespace, path, path2, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))
.replace('{' + 'path' + '}', encodeURIComponent(String(path)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['*/*'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling connectDeleteNamespacedPodProxyWithPath.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling connectDeleteNamespacedPodProxyWithPath.');
}
// verify required parameter 'path' is not null or undefined
if (path === null || path === undefined) {
throw new Error('Required parameter path was null or undefined when calling connectDeleteNamespacedPodProxyWithPath.');
}
if (path2 !== undefined) {
localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* connect DELETE requests to proxy of Service
* @param name name of the ServiceProxyOptions
* @param namespace object name and auth scope, such as for teams and projects
* @param path Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy.
*/
async connectDeleteNamespacedServiceProxy(name, namespace, path, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['*/*'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling connectDeleteNamespacedServiceProxy.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling connectDeleteNamespacedServiceProxy.');
}
if (path !== undefined) {
localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* connect DELETE requests to proxy of Service
* @param name name of the ServiceProxyOptions
* @param namespace object name and auth scope, such as for teams and projects
* @param path path to the resource
* @param path2 Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy.
*/
async connectDeleteNamespacedServiceProxyWithPath(name, namespace, path, path2, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))
.replace('{' + 'path' + '}', encodeURIComponent(String(path)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['*/*'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling connectDeleteNamespacedServiceProxyWithPath.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling connectDeleteNamespacedServiceProxyWithPath.');
}
// verify required parameter 'path' is not null or undefined
if (path === null || path === undefined) {
throw new Error('Required parameter path was null or undefined when calling connectDeleteNamespacedServiceProxyWithPath.');
}
if (path2 !== undefined) {
localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* connect DELETE requests to proxy of Node
* @param name name of the NodeProxyOptions
* @param path Path is the URL path to use for the current proxy request to node.
*/
async connectDeleteNodeProxy(name, path, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/nodes/{name}/proxy'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['*/*'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling connectDeleteNodeProxy.');
}
if (path !== undefined) {
localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* connect DELETE requests to proxy of Node
* @param name name of the NodeProxyOptions
* @param path path to the resource
* @param path2 Path is the URL path to use for the current proxy request to node.
*/
async connectDeleteNodeProxyWithPath(name, path, path2, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/nodes/{name}/proxy/{path}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'path' + '}', encodeURIComponent(String(path)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['*/*'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling connectDeleteNodeProxyWithPath.');
}
// verify required parameter 'path' is not null or undefined
if (path === null || path === undefined) {
throw new Error('Required parameter path was null or undefined when calling connectDeleteNodeProxyWithPath.');
}
if (path2 !== undefined) {
localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* connect GET requests to attach of Pod
* @param name name of the PodAttachOptions
* @param namespace object name and auth scope, such as for teams and projects
* @param container The container in which to execute the command. Defaults to only container if there is only one container in the pod.
* @param stderr Stderr if true indicates that stderr is to be redirected for the attach call. Defaults to true.
* @param stdin Stdin if true, redirects the standard input stream of the pod for this call. Defaults to false.
* @param stdout Stdout if true indicates that stdout is to be redirected for the attach call. Defaults to true.
* @param tty TTY if true indicates that a tty will be allocated for the attach call. This is passed through the container runtime so the tty is allocated on the worker node by the container runtime. Defaults to false.
*/
async connectGetNamespacedPodAttach(name, namespace, container, stderr, stdin, stdout, tty, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/attach'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['*/*'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling connectGetNamespacedPodAttach.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling connectGetNamespacedPodAttach.');
}
if (container !== undefined) {
localVarQueryParameters['container'] = models_1.ObjectSerializer.serialize(container, "string");
}
if (stderr !== undefined) {
localVarQueryParameters['stderr'] = models_1.ObjectSerializer.serialize(stderr, "boolean");
}
if (stdin !== undefined) {
localVarQueryParameters['stdin'] = models_1.ObjectSerializer.serialize(stdin, "boolean");
}
if (stdout !== undefined) {
localVarQueryParameters['stdout'] = models_1.ObjectSerializer.serialize(stdout, "boolean");
}
if (tty !== undefined) {
localVarQueryParameters['tty'] = models_1.ObjectSerializer.serialize(tty, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* connect GET requests to exec of Pod
* @param name name of the PodExecOptions
* @param namespace object name and auth scope, such as for teams and projects
* @param command Command is the remote command to execute. argv array. Not executed within a shell.
* @param container Container in which to execute the command. Defaults to only container if there is only one container in the pod.
* @param stderr Redirect the standard error stream of the pod for this call. Defaults to true.
* @param stdin Redirect the standard input stream of the pod for this call. Defaults to false.
* @param stdout Redirect the standard output stream of the pod for this call. Defaults to true.
* @param tty TTY if true indicates that a tty will be allocated for the exec call. Defaults to false.
*/
async connectGetNamespacedPodExec(name, namespace, command, container, stderr, stdin, stdout, tty, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/exec'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['*/*'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling connectGetNamespacedPodExec.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling connectGetNamespacedPodExec.');
}
if (command !== undefined) {
localVarQueryParameters['command'] = models_1.ObjectSerializer.serialize(command, "string");
}
if (container !== undefined) {
localVarQueryParameters['container'] = models_1.ObjectSerializer.serialize(container, "string");
}
if (stderr !== undefined) {
localVarQueryParameters['stderr'] = models_1.ObjectSerializer.serialize(stderr, "boolean");
}
if (stdin !== undefined) {
localVarQueryParameters['stdin'] = models_1.ObjectSerializer.serialize(stdin, "boolean");
}
if (stdout !== undefined) {
localVarQueryParameters['stdout'] = models_1.ObjectSerializer.serialize(stdout, "boolean");
}
if (tty !== undefined) {
localVarQueryParameters['tty'] = models_1.ObjectSerializer.serialize(tty, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* connect GET requests to portforward of Pod
* @param name name of the PodPortForwardOptions
* @param namespace object name and auth scope, such as for teams and projects
* @param ports List of ports to forward Required when using WebSockets
*/
async connectGetNamespacedPodPortforward(name, namespace, ports, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/portforward'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['*/*'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling connectGetNamespacedPodPortforward.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling connectGetNamespacedPodPortforward.');
}
if (ports !== undefined) {
localVarQueryParameters['ports'] = models_1.ObjectSerializer.serialize(ports, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* connect GET requests to proxy of Pod
* @param name name of the PodProxyOptions
* @param namespace object name and auth scope, such as for teams and projects
* @param path Path is the URL path to use for the current proxy request to pod.
*/
async connectGetNamespacedPodProxy(name, namespace, path, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/proxy'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['*/*'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling connectGetNamespacedPodProxy.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling connectGetNamespacedPodProxy.');
}
if (path !== undefined) {
localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* connect GET requests to proxy of Pod
* @param name name of the PodProxyOptions
* @param namespace object name and auth scope, such as for teams and projects
* @param path path to the resource
* @param path2 Path is the URL path to use for the current proxy request to pod.
*/
async connectGetNamespacedPodProxyWithPath(name, namespace, path, path2, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))
.replace('{' + 'path' + '}', encodeURIComponent(String(path)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['*/*'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling connectGetNamespacedPodProxyWithPath.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling connectGetNamespacedPodProxyWithPath.');
}
// verify required parameter 'path' is not null or undefined
if (path === null || path === undefined) {
throw new Error('Required parameter path was null or undefined when calling connectGetNamespacedPodProxyWithPath.');
}
if (path2 !== undefined) {
localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* connect GET requests to proxy of Service
* @param name name of the ServiceProxyOptions
* @param namespace object name and auth scope, such as for teams and projects
* @param path Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy.
*/
async connectGetNamespacedServiceProxy(name, namespace, path, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['*/*'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling connectGetNamespacedServiceProxy.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling connectGetNamespacedServiceProxy.');
}
if (path !== undefined) {
localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* connect GET requests to proxy of Service
* @param name name of the ServiceProxyOptions
* @param namespace object name and auth scope, such as for teams and projects
* @param path path to the resource
* @param path2 Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy.
*/
async connectGetNamespacedServiceProxyWithPath(name, namespace, path, path2, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))
.replace('{' + 'path' + '}', encodeURIComponent(String(path)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['*/*'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling connectGetNamespacedServiceProxyWithPath.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling connectGetNamespacedServiceProxyWithPath.');
}
// verify required parameter 'path' is not null or undefined
if (path === null || path === undefined) {
throw new Error('Required parameter path was null or undefined when calling connectGetNamespacedServiceProxyWithPath.');
}
if (path2 !== undefined) {
localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* connect GET requests to proxy of Node
* @param name name of the NodeProxyOptions
* @param path Path is the URL path to use for the current proxy request to node.
*/
async connectGetNodeProxy(name, path, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/nodes/{name}/proxy'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['*/*'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling connectGetNodeProxy.');
}
if (path !== undefined) {
localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* connect GET requests to proxy of Node
* @param name name of the NodeProxyOptions
* @param path path to the resource
* @param path2 Path is the URL path to use for the current proxy request to node.
*/
async connectGetNodeProxyWithPath(name, path, path2, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/nodes/{name}/proxy/{path}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'path' + '}', encodeURIComponent(String(path)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['*/*'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling connectGetNodeProxyWithPath.');
}
// verify required parameter 'path' is not null or undefined
if (path === null || path === undefined) {
throw new Error('Required parameter path was null or undefined when calling connectGetNodeProxyWithPath.');
}
if (path2 !== undefined) {
localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* connect HEAD requests to proxy of Pod
* @param name name of the PodProxyOptions
* @param namespace object name and auth scope, such as for teams and projects
* @param path Path is the URL path to use for the current proxy request to pod.
*/
async connectHeadNamespacedPodProxy(name, namespace, path, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/proxy'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['*/*'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling connectHeadNamespacedPodProxy.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling connectHeadNamespacedPodProxy.');
}
if (path !== undefined) {
localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'HEAD',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* connect HEAD requests to proxy of Pod
* @param name name of the PodProxyOptions
* @param namespace object name and auth scope, such as for teams and projects
* @param path path to the resource
* @param path2 Path is the URL path to use for the current proxy request to pod.
*/
async connectHeadNamespacedPodProxyWithPath(name, namespace, path, path2, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))
.replace('{' + 'path' + '}', encodeURIComponent(String(path)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['*/*'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling connectHeadNamespacedPodProxyWithPath.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling connectHeadNamespacedPodProxyWithPath.');
}
// verify required parameter 'path' is not null or undefined
if (path === null || path === undefined) {
throw new Error('Required parameter path was null or undefined when calling connectHeadNamespacedPodProxyWithPath.');
}
if (path2 !== undefined) {
localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'HEAD',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* connect HEAD requests to proxy of Service
* @param name name of the ServiceProxyOptions
* @param namespace object name and auth scope, such as for teams and projects
* @param path Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy.
*/
async connectHeadNamespacedServiceProxy(name, namespace, path, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['*/*'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling connectHeadNamespacedServiceProxy.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling connectHeadNamespacedServiceProxy.');
}
if (path !== undefined) {
localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'HEAD',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* connect HEAD requests to proxy of Service
* @param name name of the ServiceProxyOptions
* @param namespace object name and auth scope, such as for teams and projects
* @param path path to the resource
* @param path2 Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy.
*/
async connectHeadNamespacedServiceProxyWithPath(name, namespace, path, path2, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))
.replace('{' + 'path' + '}', encodeURIComponent(String(path)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['*/*'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling connectHeadNamespacedServiceProxyWithPath.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling connectHeadNamespacedServiceProxyWithPath.');
}
// verify required parameter 'path' is not null or undefined
if (path === null || path === undefined) {
throw new Error('Required parameter path was null or undefined when calling connectHeadNamespacedServiceProxyWithPath.');
}
if (path2 !== undefined) {
localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'HEAD',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* connect HEAD requests to proxy of Node
* @param name name of the NodeProxyOptions
* @param path Path is the URL path to use for the current proxy request to node.
*/
async connectHeadNodeProxy(name, path, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/nodes/{name}/proxy'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['*/*'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling connectHeadNodeProxy.');
}
if (path !== undefined) {
localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'HEAD',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* connect HEAD requests to proxy of Node
* @param name name of the NodeProxyOptions
* @param path path to the resource
* @param path2 Path is the URL path to use for the current proxy request to node.
*/
async connectHeadNodeProxyWithPath(name, path, path2, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/nodes/{name}/proxy/{path}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'path' + '}', encodeURIComponent(String(path)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['*/*'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling connectHeadNodeProxyWithPath.');
}
// verify required parameter 'path' is not null or undefined
if (path === null || path === undefined) {
throw new Error('Required parameter path was null or undefined when calling connectHeadNodeProxyWithPath.');
}
if (path2 !== undefined) {
localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'HEAD',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* connect OPTIONS requests to proxy of Pod
* @param name name of the PodProxyOptions
* @param namespace object name and auth scope, such as for teams and projects
* @param path Path is the URL path to use for the current proxy request to pod.
*/
async connectOptionsNamespacedPodProxy(name, namespace, path, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/proxy'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['*/*'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling connectOptionsNamespacedPodProxy.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling connectOptionsNamespacedPodProxy.');
}
if (path !== undefined) {
localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'OPTIONS',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* connect OPTIONS requests to proxy of Pod
* @param name name of the PodProxyOptions
* @param namespace object name and auth scope, such as for teams and projects
* @param path path to the resource
* @param path2 Path is the URL path to use for the current proxy request to pod.
*/
async connectOptionsNamespacedPodProxyWithPath(name, namespace, path, path2, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))
.replace('{' + 'path' + '}', encodeURIComponent(String(path)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['*/*'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling connectOptionsNamespacedPodProxyWithPath.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling connectOptionsNamespacedPodProxyWithPath.');
}
// verify required parameter 'path' is not null or undefined
if (path === null || path === undefined) {
throw new Error('Required parameter path was null or undefined when calling connectOptionsNamespacedPodProxyWithPath.');
}
if (path2 !== undefined) {
localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'OPTIONS',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* connect OPTIONS requests to proxy of Service
* @param name name of the ServiceProxyOptions
* @param namespace object name and auth scope, such as for teams and projects
* @param path Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy.
*/
async connectOptionsNamespacedServiceProxy(name, namespace, path, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['*/*'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling connectOptionsNamespacedServiceProxy.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling connectOptionsNamespacedServiceProxy.');
}
if (path !== undefined) {
localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'OPTIONS',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* connect OPTIONS requests to proxy of Service
* @param name name of the ServiceProxyOptions
* @param namespace object name and auth scope, such as for teams and projects
* @param path path to the resource
* @param path2 Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy.
*/
async connectOptionsNamespacedServiceProxyWithPath(name, namespace, path, path2, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))
.replace('{' + 'path' + '}', encodeURIComponent(String(path)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['*/*'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling connectOptionsNamespacedServiceProxyWithPath.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling connectOptionsNamespacedServiceProxyWithPath.');
}
// verify required parameter 'path' is not null or undefined
if (path === null || path === undefined) {
throw new Error('Required parameter path was null or undefined when calling connectOptionsNamespacedServiceProxyWithPath.');
}
if (path2 !== undefined) {
localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'OPTIONS',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* connect OPTIONS requests to proxy of Node
* @param name name of the NodeProxyOptions
* @param path Path is the URL path to use for the current proxy request to node.
*/
async connectOptionsNodeProxy(name, path, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/nodes/{name}/proxy'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['*/*'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling connectOptionsNodeProxy.');
}
if (path !== undefined) {
localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'OPTIONS',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* connect OPTIONS requests to proxy of Node
* @param name name of the NodeProxyOptions
* @param path path to the resource
* @param path2 Path is the URL path to use for the current proxy request to node.
*/
async connectOptionsNodeProxyWithPath(name, path, path2, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/nodes/{name}/proxy/{path}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'path' + '}', encodeURIComponent(String(path)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['*/*'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling connectOptionsNodeProxyWithPath.');
}
// verify required parameter 'path' is not null or undefined
if (path === null || path === undefined) {
throw new Error('Required parameter path was null or undefined when calling connectOptionsNodeProxyWithPath.');
}
if (path2 !== undefined) {
localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'OPTIONS',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* connect PATCH requests to proxy of Pod
* @param name name of the PodProxyOptions
* @param namespace object name and auth scope, such as for teams and projects
* @param path Path is the URL path to use for the current proxy request to pod.
*/
async connectPatchNamespacedPodProxy(name, namespace, path, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/proxy'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['*/*'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling connectPatchNamespacedPodProxy.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling connectPatchNamespacedPodProxy.');
}
if (path !== undefined) {
localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* connect PATCH requests to proxy of Pod
* @param name name of the PodProxyOptions
* @param namespace object name and auth scope, such as for teams and projects
* @param path path to the resource
* @param path2 Path is the URL path to use for the current proxy request to pod.
*/
async connectPatchNamespacedPodProxyWithPath(name, namespace, path, path2, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))
.replace('{' + 'path' + '}', encodeURIComponent(String(path)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['*/*'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling connectPatchNamespacedPodProxyWithPath.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling connectPatchNamespacedPodProxyWithPath.');
}
// verify required parameter 'path' is not null or undefined
if (path === null || path === undefined) {
throw new Error('Required parameter path was null or undefined when calling connectPatchNamespacedPodProxyWithPath.');
}
if (path2 !== undefined) {
localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* connect PATCH requests to proxy of Service
* @param name name of the ServiceProxyOptions
* @param namespace object name and auth scope, such as for teams and projects
* @param path Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy.
*/
async connectPatchNamespacedServiceProxy(name, namespace, path, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['*/*'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling connectPatchNamespacedServiceProxy.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling connectPatchNamespacedServiceProxy.');
}
if (path !== undefined) {
localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* connect PATCH requests to proxy of Service
* @param name name of the ServiceProxyOptions
* @param namespace object name and auth scope, such as for teams and projects
* @param path path to the resource
* @param path2 Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy.
*/
async connectPatchNamespacedServiceProxyWithPath(name, namespace, path, path2, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))
.replace('{' + 'path' + '}', encodeURIComponent(String(path)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['*/*'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling connectPatchNamespacedServiceProxyWithPath.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling connectPatchNamespacedServiceProxyWithPath.');
}
// verify required parameter 'path' is not null or undefined
if (path === null || path === undefined) {
throw new Error('Required parameter path was null or undefined when calling connectPatchNamespacedServiceProxyWithPath.');
}
if (path2 !== undefined) {
localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* connect PATCH requests to proxy of Node
* @param name name of the NodeProxyOptions
* @param path Path is the URL path to use for the current proxy request to node.
*/
async connectPatchNodeProxy(name, path, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/nodes/{name}/proxy'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['*/*'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling connectPatchNodeProxy.');
}
if (path !== undefined) {
localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* connect PATCH requests to proxy of Node
* @param name name of the NodeProxyOptions
* @param path path to the resource
* @param path2 Path is the URL path to use for the current proxy request to node.
*/
async connectPatchNodeProxyWithPath(name, path, path2, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/nodes/{name}/proxy/{path}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'path' + '}', encodeURIComponent(String(path)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['*/*'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling connectPatchNodeProxyWithPath.');
}
// verify required parameter 'path' is not null or undefined
if (path === null || path === undefined) {
throw new Error('Required parameter path was null or undefined when calling connectPatchNodeProxyWithPath.');
}
if (path2 !== undefined) {
localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* connect POST requests to attach of Pod
* @param name name of the PodAttachOptions
* @param namespace object name and auth scope, such as for teams and projects
* @param container The container in which to execute the command. Defaults to only container if there is only one container in the pod.
* @param stderr Stderr if true indicates that stderr is to be redirected for the attach call. Defaults to true.
* @param stdin Stdin if true, redirects the standard input stream of the pod for this call. Defaults to false.
* @param stdout Stdout if true indicates that stdout is to be redirected for the attach call. Defaults to true.
* @param tty TTY if true indicates that a tty will be allocated for the attach call. This is passed through the container runtime so the tty is allocated on the worker node by the container runtime. Defaults to false.
*/
async connectPostNamespacedPodAttach(name, namespace, container, stderr, stdin, stdout, tty, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/attach'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['*/*'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling connectPostNamespacedPodAttach.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling connectPostNamespacedPodAttach.');
}
if (container !== undefined) {
localVarQueryParameters['container'] = models_1.ObjectSerializer.serialize(container, "string");
}
if (stderr !== undefined) {
localVarQueryParameters['stderr'] = models_1.ObjectSerializer.serialize(stderr, "boolean");
}
if (stdin !== undefined) {
localVarQueryParameters['stdin'] = models_1.ObjectSerializer.serialize(stdin, "boolean");
}
if (stdout !== undefined) {
localVarQueryParameters['stdout'] = models_1.ObjectSerializer.serialize(stdout, "boolean");
}
if (tty !== undefined) {
localVarQueryParameters['tty'] = models_1.ObjectSerializer.serialize(tty, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* connect POST requests to exec of Pod
* @param name name of the PodExecOptions
* @param namespace object name and auth scope, such as for teams and projects
* @param command Command is the remote command to execute. argv array. Not executed within a shell.
* @param container Container in which to execute the command. Defaults to only container if there is only one container in the pod.
* @param stderr Redirect the standard error stream of the pod for this call. Defaults to true.
* @param stdin Redirect the standard input stream of the pod for this call. Defaults to false.
* @param stdout Redirect the standard output stream of the pod for this call. Defaults to true.
* @param tty TTY if true indicates that a tty will be allocated for the exec call. Defaults to false.
*/
async connectPostNamespacedPodExec(name, namespace, command, container, stderr, stdin, stdout, tty, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/exec'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['*/*'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling connectPostNamespacedPodExec.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling connectPostNamespacedPodExec.');
}
if (command !== undefined) {
localVarQueryParameters['command'] = models_1.ObjectSerializer.serialize(command, "string");
}
if (container !== undefined) {
localVarQueryParameters['container'] = models_1.ObjectSerializer.serialize(container, "string");
}
if (stderr !== undefined) {
localVarQueryParameters['stderr'] = models_1.ObjectSerializer.serialize(stderr, "boolean");
}
if (stdin !== undefined) {
localVarQueryParameters['stdin'] = models_1.ObjectSerializer.serialize(stdin, "boolean");
}
if (stdout !== undefined) {
localVarQueryParameters['stdout'] = models_1.ObjectSerializer.serialize(stdout, "boolean");
}
if (tty !== undefined) {
localVarQueryParameters['tty'] = models_1.ObjectSerializer.serialize(tty, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* connect POST requests to portforward of Pod
* @param name name of the PodPortForwardOptions
* @param namespace object name and auth scope, such as for teams and projects
* @param ports List of ports to forward Required when using WebSockets
*/
async connectPostNamespacedPodPortforward(name, namespace, ports, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/portforward'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['*/*'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling connectPostNamespacedPodPortforward.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling connectPostNamespacedPodPortforward.');
}
if (ports !== undefined) {
localVarQueryParameters['ports'] = models_1.ObjectSerializer.serialize(ports, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* connect POST requests to proxy of Pod
* @param name name of the PodProxyOptions
* @param namespace object name and auth scope, such as for teams and projects
* @param path Path is the URL path to use for the current proxy request to pod.
*/
async connectPostNamespacedPodProxy(name, namespace, path, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/proxy'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['*/*'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling connectPostNamespacedPodProxy.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling connectPostNamespacedPodProxy.');
}
if (path !== undefined) {
localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* connect POST requests to proxy of Pod
* @param name name of the PodProxyOptions
* @param namespace object name and auth scope, such as for teams and projects
* @param path path to the resource
* @param path2 Path is the URL path to use for the current proxy request to pod.
*/
async connectPostNamespacedPodProxyWithPath(name, namespace, path, path2, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))
.replace('{' + 'path' + '}', encodeURIComponent(String(path)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['*/*'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling connectPostNamespacedPodProxyWithPath.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling connectPostNamespacedPodProxyWithPath.');
}
// verify required parameter 'path' is not null or undefined
if (path === null || path === undefined) {
throw new Error('Required parameter path was null or undefined when calling connectPostNamespacedPodProxyWithPath.');
}
if (path2 !== undefined) {
localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* connect POST requests to proxy of Service
* @param name name of the ServiceProxyOptions
* @param namespace object name and auth scope, such as for teams and projects
* @param path Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy.
*/
async connectPostNamespacedServiceProxy(name, namespace, path, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['*/*'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling connectPostNamespacedServiceProxy.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling connectPostNamespacedServiceProxy.');
}
if (path !== undefined) {
localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* connect POST requests to proxy of Service
* @param name name of the ServiceProxyOptions
* @param namespace object name and auth scope, such as for teams and projects
* @param path path to the resource
* @param path2 Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy.
*/
async connectPostNamespacedServiceProxyWithPath(name, namespace, path, path2, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))
.replace('{' + 'path' + '}', encodeURIComponent(String(path)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['*/*'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling connectPostNamespacedServiceProxyWithPath.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling connectPostNamespacedServiceProxyWithPath.');
}
// verify required parameter 'path' is not null or undefined
if (path === null || path === undefined) {
throw new Error('Required parameter path was null or undefined when calling connectPostNamespacedServiceProxyWithPath.');
}
if (path2 !== undefined) {
localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* connect POST requests to proxy of Node
* @param name name of the NodeProxyOptions
* @param path Path is the URL path to use for the current proxy request to node.
*/
async connectPostNodeProxy(name, path, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/nodes/{name}/proxy'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['*/*'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling connectPostNodeProxy.');
}
if (path !== undefined) {
localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* connect POST requests to proxy of Node
* @param name name of the NodeProxyOptions
* @param path path to the resource
* @param path2 Path is the URL path to use for the current proxy request to node.
*/
async connectPostNodeProxyWithPath(name, path, path2, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/nodes/{name}/proxy/{path}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'path' + '}', encodeURIComponent(String(path)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['*/*'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling connectPostNodeProxyWithPath.');
}
// verify required parameter 'path' is not null or undefined
if (path === null || path === undefined) {
throw new Error('Required parameter path was null or undefined when calling connectPostNodeProxyWithPath.');
}
if (path2 !== undefined) {
localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* connect PUT requests to proxy of Pod
* @param name name of the PodProxyOptions
* @param namespace object name and auth scope, such as for teams and projects
* @param path Path is the URL path to use for the current proxy request to pod.
*/
async connectPutNamespacedPodProxy(name, namespace, path, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/proxy'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['*/*'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling connectPutNamespacedPodProxy.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling connectPutNamespacedPodProxy.');
}
if (path !== undefined) {
localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* connect PUT requests to proxy of Pod
* @param name name of the PodProxyOptions
* @param namespace object name and auth scope, such as for teams and projects
* @param path path to the resource
* @param path2 Path is the URL path to use for the current proxy request to pod.
*/
async connectPutNamespacedPodProxyWithPath(name, namespace, path, path2, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))
.replace('{' + 'path' + '}', encodeURIComponent(String(path)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['*/*'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling connectPutNamespacedPodProxyWithPath.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling connectPutNamespacedPodProxyWithPath.');
}
// verify required parameter 'path' is not null or undefined
if (path === null || path === undefined) {
throw new Error('Required parameter path was null or undefined when calling connectPutNamespacedPodProxyWithPath.');
}
if (path2 !== undefined) {
localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* connect PUT requests to proxy of Service
* @param name name of the ServiceProxyOptions
* @param namespace object name and auth scope, such as for teams and projects
* @param path Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy.
*/
async connectPutNamespacedServiceProxy(name, namespace, path, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['*/*'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling connectPutNamespacedServiceProxy.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling connectPutNamespacedServiceProxy.');
}
if (path !== undefined) {
localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* connect PUT requests to proxy of Service
* @param name name of the ServiceProxyOptions
* @param namespace object name and auth scope, such as for teams and projects
* @param path path to the resource
* @param path2 Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy.
*/
async connectPutNamespacedServiceProxyWithPath(name, namespace, path, path2, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))
.replace('{' + 'path' + '}', encodeURIComponent(String(path)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['*/*'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling connectPutNamespacedServiceProxyWithPath.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling connectPutNamespacedServiceProxyWithPath.');
}
// verify required parameter 'path' is not null or undefined
if (path === null || path === undefined) {
throw new Error('Required parameter path was null or undefined when calling connectPutNamespacedServiceProxyWithPath.');
}
if (path2 !== undefined) {
localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* connect PUT requests to proxy of Node
* @param name name of the NodeProxyOptions
* @param path Path is the URL path to use for the current proxy request to node.
*/
async connectPutNodeProxy(name, path, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/nodes/{name}/proxy'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['*/*'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling connectPutNodeProxy.');
}
if (path !== undefined) {
localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* connect PUT requests to proxy of Node
* @param name name of the NodeProxyOptions
* @param path path to the resource
* @param path2 Path is the URL path to use for the current proxy request to node.
*/
async connectPutNodeProxyWithPath(name, path, path2, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/nodes/{name}/proxy/{path}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'path' + '}', encodeURIComponent(String(path)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['*/*'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling connectPutNodeProxyWithPath.');
}
// verify required parameter 'path' is not null or undefined
if (path === null || path === undefined) {
throw new Error('Required parameter path was null or undefined when calling connectPutNodeProxyWithPath.');
}
if (path2 !== undefined) {
localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* create a Namespace
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createNamespace(body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createNamespace.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1Namespace")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Namespace");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* create a Binding
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
* @param pretty If \'true\', then the output is pretty printed.
*/
async createNamespacedBinding(namespace, body, dryRun, fieldManager, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/bindings'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling createNamespacedBinding.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createNamespacedBinding.');
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1Binding")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Binding");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* create a ConfigMap
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createNamespacedConfigMap(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/configmaps'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling createNamespacedConfigMap.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createNamespacedConfigMap.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1ConfigMap")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ConfigMap");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* create Endpoints
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createNamespacedEndpoints(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/endpoints'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling createNamespacedEndpoints.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createNamespacedEndpoints.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1Endpoints")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Endpoints");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* create an Event
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createNamespacedEvent(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/events'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling createNamespacedEvent.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createNamespacedEvent.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "CoreV1Event")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "CoreV1Event");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* create a LimitRange
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createNamespacedLimitRange(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/limitranges'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling createNamespacedLimitRange.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createNamespacedLimitRange.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1LimitRange")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1LimitRange");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* create a PersistentVolumeClaim
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createNamespacedPersistentVolumeClaim(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/persistentvolumeclaims'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling createNamespacedPersistentVolumeClaim.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createNamespacedPersistentVolumeClaim.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1PersistentVolumeClaim")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1PersistentVolumeClaim");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* create a Pod
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createNamespacedPod(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling createNamespacedPod.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createNamespacedPod.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1Pod")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Pod");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* create binding of a Pod
* @param name name of the Binding
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
* @param pretty If \'true\', then the output is pretty printed.
*/
async createNamespacedPodBinding(name, namespace, body, dryRun, fieldManager, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/binding'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling createNamespacedPodBinding.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling createNamespacedPodBinding.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createNamespacedPodBinding.');
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1Binding")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Binding");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* create eviction of a Pod
* @param name name of the Eviction
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
* @param pretty If \'true\', then the output is pretty printed.
*/
async createNamespacedPodEviction(name, namespace, body, dryRun, fieldManager, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/eviction'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling createNamespacedPodEviction.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling createNamespacedPodEviction.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createNamespacedPodEviction.');
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1Eviction")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Eviction");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* create a PodTemplate
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createNamespacedPodTemplate(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/podtemplates'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling createNamespacedPodTemplate.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createNamespacedPodTemplate.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1PodTemplate")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1PodTemplate");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* create a ReplicationController
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createNamespacedReplicationController(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/replicationcontrollers'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling createNamespacedReplicationController.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createNamespacedReplicationController.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1ReplicationController")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ReplicationController");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* create a ResourceQuota
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createNamespacedResourceQuota(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/resourcequotas'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling createNamespacedResourceQuota.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createNamespacedResourceQuota.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1ResourceQuota")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ResourceQuota");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* create a Secret
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createNamespacedSecret(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/secrets'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling createNamespacedSecret.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createNamespacedSecret.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1Secret")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Secret");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* create a Service
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createNamespacedService(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling createNamespacedService.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createNamespacedService.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1Service")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Service");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* create a ServiceAccount
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createNamespacedServiceAccount(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/serviceaccounts'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling createNamespacedServiceAccount.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createNamespacedServiceAccount.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1ServiceAccount")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ServiceAccount");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* create token of a ServiceAccount
* @param name name of the TokenRequest
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
* @param pretty If \'true\', then the output is pretty printed.
*/
async createNamespacedServiceAccountToken(name, namespace, body, dryRun, fieldManager, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/serviceaccounts/{name}/token'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling createNamespacedServiceAccountToken.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling createNamespacedServiceAccountToken.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createNamespacedServiceAccountToken.');
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "AuthenticationV1TokenRequest")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "AuthenticationV1TokenRequest");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* create a Node
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createNode(body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/nodes';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createNode.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1Node")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Node");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* create a PersistentVolume
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createPersistentVolume(body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/persistentvolumes';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createPersistentVolume.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1PersistentVolume")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1PersistentVolume");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of ConfigMap
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionNamespacedConfigMap(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/configmaps'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedConfigMap.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of Endpoints
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionNamespacedEndpoints(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/endpoints'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedEndpoints.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of Event
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionNamespacedEvent(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/events'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedEvent.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of LimitRange
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionNamespacedLimitRange(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/limitranges'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedLimitRange.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of PersistentVolumeClaim
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionNamespacedPersistentVolumeClaim(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/persistentvolumeclaims'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedPersistentVolumeClaim.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of Pod
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionNamespacedPod(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedPod.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of PodTemplate
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionNamespacedPodTemplate(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/podtemplates'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedPodTemplate.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of ReplicationController
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionNamespacedReplicationController(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/replicationcontrollers'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedReplicationController.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of ResourceQuota
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionNamespacedResourceQuota(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/resourcequotas'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedResourceQuota.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of Secret
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionNamespacedSecret(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/secrets'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedSecret.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of ServiceAccount
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionNamespacedServiceAccount(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/serviceaccounts'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedServiceAccount.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of Node
* @param pretty If \'true\', then the output is pretty printed.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionNode(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/nodes';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of PersistentVolume
* @param pretty If \'true\', then the output is pretty printed.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionPersistentVolume(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/persistentvolumes';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a Namespace
* @param name name of the Namespace
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param body
*/
async deleteNamespace(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteNamespace.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a ConfigMap
* @param name name of the ConfigMap
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param body
*/
async deleteNamespacedConfigMap(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/configmaps/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteNamespacedConfigMap.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedConfigMap.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete Endpoints
* @param name name of the Endpoints
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param body
*/
async deleteNamespacedEndpoints(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/endpoints/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteNamespacedEndpoints.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedEndpoints.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete an Event
* @param name name of the Event
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param body
*/
async deleteNamespacedEvent(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/events/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteNamespacedEvent.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedEvent.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a LimitRange
* @param name name of the LimitRange
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param body
*/
async deleteNamespacedLimitRange(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/limitranges/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteNamespacedLimitRange.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedLimitRange.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a PersistentVolumeClaim
* @param name name of the PersistentVolumeClaim
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param body
*/
async deleteNamespacedPersistentVolumeClaim(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteNamespacedPersistentVolumeClaim.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedPersistentVolumeClaim.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1PersistentVolumeClaim");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a Pod
* @param name name of the Pod
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param body
*/
async deleteNamespacedPod(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteNamespacedPod.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedPod.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Pod");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a PodTemplate
* @param name name of the PodTemplate
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param body
*/
async deleteNamespacedPodTemplate(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/podtemplates/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteNamespacedPodTemplate.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedPodTemplate.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1PodTemplate");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a ReplicationController
* @param name name of the ReplicationController
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param body
*/
async deleteNamespacedReplicationController(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/replicationcontrollers/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteNamespacedReplicationController.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedReplicationController.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a ResourceQuota
* @param name name of the ResourceQuota
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param body
*/
async deleteNamespacedResourceQuota(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/resourcequotas/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteNamespacedResourceQuota.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedResourceQuota.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ResourceQuota");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a Secret
* @param name name of the Secret
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param body
*/
async deleteNamespacedSecret(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/secrets/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteNamespacedSecret.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedSecret.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a Service
* @param name name of the Service
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param body
*/
async deleteNamespacedService(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteNamespacedService.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedService.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a ServiceAccount
* @param name name of the ServiceAccount
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param body
*/
async deleteNamespacedServiceAccount(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/serviceaccounts/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteNamespacedServiceAccount.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedServiceAccount.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ServiceAccount");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a Node
* @param name name of the Node
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param body
*/
async deleteNode(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/nodes/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteNode.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a PersistentVolume
* @param name name of the PersistentVolume
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param body
*/
async deletePersistentVolume(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/persistentvolumes/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deletePersistentVolume.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1PersistentVolume");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* get available resources
*/
async getAPIResources(options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list objects of kind ComponentStatus
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param pretty If \'true\', then the output is pretty printed.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listComponentStatus(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/componentstatuses';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ComponentStatusList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind ConfigMap
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param pretty If \'true\', then the output is pretty printed.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listConfigMapForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/configmaps';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ConfigMapList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind Endpoints
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param pretty If \'true\', then the output is pretty printed.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listEndpointsForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/endpoints';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1EndpointsList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind Event
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param pretty If \'true\', then the output is pretty printed.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listEventForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/events';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "CoreV1EventList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind LimitRange
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param pretty If \'true\', then the output is pretty printed.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listLimitRangeForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/limitranges';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1LimitRangeList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind Namespace
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listNamespace(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1NamespaceList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind ConfigMap
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listNamespacedConfigMap(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/configmaps'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling listNamespacedConfigMap.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ConfigMapList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind Endpoints
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listNamespacedEndpoints(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/endpoints'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling listNamespacedEndpoints.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1EndpointsList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind Event
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listNamespacedEvent(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/events'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling listNamespacedEvent.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "CoreV1EventList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind LimitRange
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listNamespacedLimitRange(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/limitranges'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling listNamespacedLimitRange.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1LimitRangeList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind PersistentVolumeClaim
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listNamespacedPersistentVolumeClaim(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/persistentvolumeclaims'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling listNamespacedPersistentVolumeClaim.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1PersistentVolumeClaimList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind Pod
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listNamespacedPod(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling listNamespacedPod.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1PodList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind PodTemplate
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listNamespacedPodTemplate(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/podtemplates'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling listNamespacedPodTemplate.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1PodTemplateList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind ReplicationController
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listNamespacedReplicationController(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/replicationcontrollers'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling listNamespacedReplicationController.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ReplicationControllerList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind ResourceQuota
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listNamespacedResourceQuota(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/resourcequotas'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling listNamespacedResourceQuota.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ResourceQuotaList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind Secret
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listNamespacedSecret(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/secrets'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling listNamespacedSecret.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1SecretList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind Service
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listNamespacedService(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling listNamespacedService.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ServiceList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind ServiceAccount
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listNamespacedServiceAccount(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/serviceaccounts'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling listNamespacedServiceAccount.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ServiceAccountList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind Node
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listNode(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/nodes';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1NodeList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind PersistentVolume
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listPersistentVolume(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/persistentvolumes';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1PersistentVolumeList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind PersistentVolumeClaim
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param pretty If \'true\', then the output is pretty printed.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listPersistentVolumeClaimForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/persistentvolumeclaims';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1PersistentVolumeClaimList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind Pod
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param pretty If \'true\', then the output is pretty printed.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listPodForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/pods';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1PodList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind PodTemplate
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param pretty If \'true\', then the output is pretty printed.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listPodTemplateForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/podtemplates';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1PodTemplateList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind ReplicationController
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param pretty If \'true\', then the output is pretty printed.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listReplicationControllerForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/replicationcontrollers';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ReplicationControllerList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind ResourceQuota
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param pretty If \'true\', then the output is pretty printed.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listResourceQuotaForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/resourcequotas';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ResourceQuotaList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind Secret
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param pretty If \'true\', then the output is pretty printed.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listSecretForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/secrets';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1SecretList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind ServiceAccount
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param pretty If \'true\', then the output is pretty printed.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listServiceAccountForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/serviceaccounts';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ServiceAccountList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind Service
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param pretty If \'true\', then the output is pretty printed.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listServiceForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/services';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ServiceList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified Namespace
* @param name name of the Namespace
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespace(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespace.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespace.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Namespace");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update status of the specified Namespace
* @param name name of the Namespace
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespaceStatus(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespaceStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespaceStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Namespace");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified ConfigMap
* @param name name of the ConfigMap
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedConfigMap(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/configmaps/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedConfigMap.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedConfigMap.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedConfigMap.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ConfigMap");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified Endpoints
* @param name name of the Endpoints
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedEndpoints(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/endpoints/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedEndpoints.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedEndpoints.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedEndpoints.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Endpoints");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified Event
* @param name name of the Event
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedEvent(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/events/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedEvent.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedEvent.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedEvent.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "CoreV1Event");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified LimitRange
* @param name name of the LimitRange
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedLimitRange(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/limitranges/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedLimitRange.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedLimitRange.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedLimitRange.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1LimitRange");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified PersistentVolumeClaim
* @param name name of the PersistentVolumeClaim
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedPersistentVolumeClaim(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedPersistentVolumeClaim.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedPersistentVolumeClaim.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedPersistentVolumeClaim.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1PersistentVolumeClaim");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update status of the specified PersistentVolumeClaim
* @param name name of the PersistentVolumeClaim
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedPersistentVolumeClaimStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedPersistentVolumeClaimStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedPersistentVolumeClaimStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedPersistentVolumeClaimStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1PersistentVolumeClaim");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified Pod
* @param name name of the Pod
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedPod(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedPod.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedPod.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedPod.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Pod");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update ephemeralcontainers of the specified Pod
* @param name name of the Pod
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedPodEphemeralcontainers(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/ephemeralcontainers'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedPodEphemeralcontainers.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedPodEphemeralcontainers.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedPodEphemeralcontainers.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Pod");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update status of the specified Pod
* @param name name of the Pod
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedPodStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedPodStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedPodStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedPodStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Pod");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified PodTemplate
* @param name name of the PodTemplate
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedPodTemplate(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/podtemplates/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedPodTemplate.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedPodTemplate.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedPodTemplate.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1PodTemplate");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified ReplicationController
* @param name name of the ReplicationController
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedReplicationController(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/replicationcontrollers/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedReplicationController.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedReplicationController.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedReplicationController.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ReplicationController");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update scale of the specified ReplicationController
* @param name name of the Scale
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedReplicationControllerScale(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/scale'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedReplicationControllerScale.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedReplicationControllerScale.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedReplicationControllerScale.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Scale");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update status of the specified ReplicationController
* @param name name of the ReplicationController
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedReplicationControllerStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedReplicationControllerStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedReplicationControllerStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedReplicationControllerStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ReplicationController");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified ResourceQuota
* @param name name of the ResourceQuota
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedResourceQuota(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/resourcequotas/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedResourceQuota.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedResourceQuota.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedResourceQuota.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ResourceQuota");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update status of the specified ResourceQuota
* @param name name of the ResourceQuota
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedResourceQuotaStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/resourcequotas/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedResourceQuotaStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedResourceQuotaStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedResourceQuotaStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ResourceQuota");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified Secret
* @param name name of the Secret
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedSecret(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/secrets/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedSecret.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedSecret.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedSecret.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Secret");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified Service
* @param name name of the Service
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedService(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedService.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedService.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedService.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Service");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified ServiceAccount
* @param name name of the ServiceAccount
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedServiceAccount(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/serviceaccounts/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedServiceAccount.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedServiceAccount.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedServiceAccount.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ServiceAccount");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update status of the specified Service
* @param name name of the Service
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedServiceStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedServiceStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedServiceStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedServiceStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Service");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified Node
* @param name name of the Node
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNode(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/nodes/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNode.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNode.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Node");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update status of the specified Node
* @param name name of the Node
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNodeStatus(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/nodes/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNodeStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNodeStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Node");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified PersistentVolume
* @param name name of the PersistentVolume
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchPersistentVolume(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/persistentvolumes/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchPersistentVolume.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchPersistentVolume.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1PersistentVolume");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update status of the specified PersistentVolume
* @param name name of the PersistentVolume
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchPersistentVolumeStatus(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/persistentvolumes/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchPersistentVolumeStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchPersistentVolumeStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1PersistentVolume");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified ComponentStatus
* @param name name of the ComponentStatus
* @param pretty If \'true\', then the output is pretty printed.
*/
async readComponentStatus(name, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/componentstatuses/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readComponentStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ComponentStatus");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified Namespace
* @param name name of the Namespace
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespace(name, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespace.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Namespace");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read status of the specified Namespace
* @param name name of the Namespace
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespaceStatus(name, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespaceStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Namespace");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified ConfigMap
* @param name name of the ConfigMap
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedConfigMap(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/configmaps/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedConfigMap.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedConfigMap.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ConfigMap");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified Endpoints
* @param name name of the Endpoints
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedEndpoints(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/endpoints/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedEndpoints.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedEndpoints.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Endpoints");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified Event
* @param name name of the Event
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedEvent(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/events/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedEvent.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedEvent.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "CoreV1Event");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified LimitRange
* @param name name of the LimitRange
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedLimitRange(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/limitranges/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedLimitRange.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedLimitRange.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1LimitRange");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified PersistentVolumeClaim
* @param name name of the PersistentVolumeClaim
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedPersistentVolumeClaim(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedPersistentVolumeClaim.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedPersistentVolumeClaim.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1PersistentVolumeClaim");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read status of the specified PersistentVolumeClaim
* @param name name of the PersistentVolumeClaim
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedPersistentVolumeClaimStatus(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedPersistentVolumeClaimStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedPersistentVolumeClaimStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1PersistentVolumeClaim");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified Pod
* @param name name of the Pod
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedPod(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedPod.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedPod.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Pod");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read ephemeralcontainers of the specified Pod
* @param name name of the Pod
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedPodEphemeralcontainers(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/ephemeralcontainers'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedPodEphemeralcontainers.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedPodEphemeralcontainers.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Pod");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read log of the specified Pod
* @param name name of the Pod
* @param namespace object name and auth scope, such as for teams and projects
* @param container The container for which to stream logs. Defaults to only container if there is one container in the pod.
* @param follow Follow the log stream of the pod. Defaults to false.
* @param insecureSkipTLSVerifyBackend insecureSkipTLSVerifyBackend indicates that the apiserver should not confirm the validity of the serving certificate of the backend it is connecting to. This will make the HTTPS connection between the apiserver and the backend insecure. This means the apiserver cannot verify the log data it is receiving came from the real kubelet. If the kubelet is configured to verify the apiserver\'s TLS credentials, it does not mean the connection to the real kubelet is vulnerable to a man in the middle attack (e.g. an attacker could not intercept the actual log data coming from the real kubelet).
* @param limitBytes If set, the number of bytes to read from the server before terminating the log output. This may not display a complete final line of logging, and may return slightly more or slightly less than the specified limit.
* @param pretty If \'true\', then the output is pretty printed.
* @param previous Return previous terminated container logs. Defaults to false.
* @param sinceSeconds A relative time in seconds before the current time from which to show logs. If this value precedes the time a pod was started, only logs since the pod start will be returned. If this value is in the future, no logs will be returned. Only one of sinceSeconds or sinceTime may be specified.
* @param tailLines If set, the number of lines from the end of the logs to show. If not specified, logs are shown from the creation of the container or sinceSeconds or sinceTime
* @param timestamps If true, add an RFC3339 or RFC3339Nano timestamp at the beginning of every line of log output. Defaults to false.
*/
async readNamespacedPodLog(name, namespace, container, follow, insecureSkipTLSVerifyBackend, limitBytes, pretty, previous, sinceSeconds, tailLines, timestamps, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/log'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['text/plain', 'application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedPodLog.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedPodLog.');
}
if (container !== undefined) {
localVarQueryParameters['container'] = models_1.ObjectSerializer.serialize(container, "string");
}
if (follow !== undefined) {
localVarQueryParameters['follow'] = models_1.ObjectSerializer.serialize(follow, "boolean");
}
if (insecureSkipTLSVerifyBackend !== undefined) {
localVarQueryParameters['insecureSkipTLSVerifyBackend'] = models_1.ObjectSerializer.serialize(insecureSkipTLSVerifyBackend, "boolean");
}
if (limitBytes !== undefined) {
localVarQueryParameters['limitBytes'] = models_1.ObjectSerializer.serialize(limitBytes, "number");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (previous !== undefined) {
localVarQueryParameters['previous'] = models_1.ObjectSerializer.serialize(previous, "boolean");
}
if (sinceSeconds !== undefined) {
localVarQueryParameters['sinceSeconds'] = models_1.ObjectSerializer.serialize(sinceSeconds, "number");
}
if (tailLines !== undefined) {
localVarQueryParameters['tailLines'] = models_1.ObjectSerializer.serialize(tailLines, "number");
}
if (timestamps !== undefined) {
localVarQueryParameters['timestamps'] = models_1.ObjectSerializer.serialize(timestamps, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read status of the specified Pod
* @param name name of the Pod
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedPodStatus(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedPodStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedPodStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Pod");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified PodTemplate
* @param name name of the PodTemplate
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedPodTemplate(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/podtemplates/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedPodTemplate.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedPodTemplate.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1PodTemplate");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified ReplicationController
* @param name name of the ReplicationController
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedReplicationController(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/replicationcontrollers/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedReplicationController.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedReplicationController.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ReplicationController");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read scale of the specified ReplicationController
* @param name name of the Scale
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedReplicationControllerScale(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/scale'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedReplicationControllerScale.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedReplicationControllerScale.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Scale");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read status of the specified ReplicationController
* @param name name of the ReplicationController
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedReplicationControllerStatus(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedReplicationControllerStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedReplicationControllerStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ReplicationController");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified ResourceQuota
* @param name name of the ResourceQuota
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedResourceQuota(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/resourcequotas/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedResourceQuota.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedResourceQuota.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ResourceQuota");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read status of the specified ResourceQuota
* @param name name of the ResourceQuota
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedResourceQuotaStatus(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/resourcequotas/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedResourceQuotaStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedResourceQuotaStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ResourceQuota");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified Secret
* @param name name of the Secret
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedSecret(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/secrets/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedSecret.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedSecret.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Secret");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified Service
* @param name name of the Service
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedService(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedService.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedService.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Service");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified ServiceAccount
* @param name name of the ServiceAccount
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedServiceAccount(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/serviceaccounts/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedServiceAccount.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedServiceAccount.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ServiceAccount");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read status of the specified Service
* @param name name of the Service
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedServiceStatus(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedServiceStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedServiceStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Service");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified Node
* @param name name of the Node
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNode(name, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/nodes/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNode.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Node");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read status of the specified Node
* @param name name of the Node
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNodeStatus(name, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/nodes/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNodeStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Node");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified PersistentVolume
* @param name name of the PersistentVolume
* @param pretty If \'true\', then the output is pretty printed.
*/
async readPersistentVolume(name, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/persistentvolumes/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readPersistentVolume.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1PersistentVolume");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read status of the specified PersistentVolume
* @param name name of the PersistentVolume
* @param pretty If \'true\', then the output is pretty printed.
*/
async readPersistentVolumeStatus(name, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/persistentvolumes/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readPersistentVolumeStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1PersistentVolume");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified Namespace
* @param name name of the Namespace
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespace(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespace.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespace.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1Namespace")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Namespace");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace finalize of the specified Namespace
* @param name name of the Namespace
* @param body
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
* @param pretty If \'true\', then the output is pretty printed.
*/
async replaceNamespaceFinalize(name, body, dryRun, fieldManager, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{name}/finalize'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespaceFinalize.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespaceFinalize.');
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1Namespace")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Namespace");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace status of the specified Namespace
* @param name name of the Namespace
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespaceStatus(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespaceStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespaceStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1Namespace")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Namespace");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified ConfigMap
* @param name name of the ConfigMap
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedConfigMap(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/configmaps/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedConfigMap.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedConfigMap.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedConfigMap.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1ConfigMap")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ConfigMap");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified Endpoints
* @param name name of the Endpoints
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedEndpoints(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/endpoints/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedEndpoints.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedEndpoints.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedEndpoints.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1Endpoints")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Endpoints");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified Event
* @param name name of the Event
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedEvent(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/events/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedEvent.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedEvent.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedEvent.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "CoreV1Event")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "CoreV1Event");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified LimitRange
* @param name name of the LimitRange
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedLimitRange(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/limitranges/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedLimitRange.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedLimitRange.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedLimitRange.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1LimitRange")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1LimitRange");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified PersistentVolumeClaim
* @param name name of the PersistentVolumeClaim
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedPersistentVolumeClaim(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedPersistentVolumeClaim.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedPersistentVolumeClaim.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedPersistentVolumeClaim.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1PersistentVolumeClaim")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1PersistentVolumeClaim");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace status of the specified PersistentVolumeClaim
* @param name name of the PersistentVolumeClaim
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedPersistentVolumeClaimStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedPersistentVolumeClaimStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedPersistentVolumeClaimStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedPersistentVolumeClaimStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1PersistentVolumeClaim")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1PersistentVolumeClaim");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified Pod
* @param name name of the Pod
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedPod(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedPod.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedPod.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedPod.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1Pod")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Pod");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace ephemeralcontainers of the specified Pod
* @param name name of the Pod
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedPodEphemeralcontainers(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/ephemeralcontainers'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedPodEphemeralcontainers.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedPodEphemeralcontainers.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedPodEphemeralcontainers.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1Pod")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Pod");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace status of the specified Pod
* @param name name of the Pod
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedPodStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedPodStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedPodStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedPodStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1Pod")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Pod");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified PodTemplate
* @param name name of the PodTemplate
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedPodTemplate(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/podtemplates/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedPodTemplate.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedPodTemplate.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedPodTemplate.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1PodTemplate")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1PodTemplate");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified ReplicationController
* @param name name of the ReplicationController
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedReplicationController(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/replicationcontrollers/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedReplicationController.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedReplicationController.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedReplicationController.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1ReplicationController")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ReplicationController");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace scale of the specified ReplicationController
* @param name name of the Scale
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedReplicationControllerScale(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/scale'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedReplicationControllerScale.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedReplicationControllerScale.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedReplicationControllerScale.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1Scale")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Scale");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace status of the specified ReplicationController
* @param name name of the ReplicationController
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedReplicationControllerStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedReplicationControllerStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedReplicationControllerStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedReplicationControllerStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1ReplicationController")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ReplicationController");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified ResourceQuota
* @param name name of the ResourceQuota
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedResourceQuota(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/resourcequotas/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedResourceQuota.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedResourceQuota.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedResourceQuota.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1ResourceQuota")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ResourceQuota");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace status of the specified ResourceQuota
* @param name name of the ResourceQuota
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedResourceQuotaStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/resourcequotas/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedResourceQuotaStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedResourceQuotaStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedResourceQuotaStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1ResourceQuota")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ResourceQuota");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified Secret
* @param name name of the Secret
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedSecret(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/secrets/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedSecret.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedSecret.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedSecret.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1Secret")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Secret");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified Service
* @param name name of the Service
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedService(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedService.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedService.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedService.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1Service")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Service");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified ServiceAccount
* @param name name of the ServiceAccount
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedServiceAccount(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/serviceaccounts/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedServiceAccount.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedServiceAccount.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedServiceAccount.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1ServiceAccount")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ServiceAccount");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace status of the specified Service
* @param name name of the Service
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedServiceStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedServiceStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedServiceStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedServiceStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1Service")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Service");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified Node
* @param name name of the Node
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNode(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/nodes/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNode.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNode.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1Node")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Node");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace status of the specified Node
* @param name name of the Node
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNodeStatus(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/nodes/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNodeStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNodeStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1Node")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Node");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified PersistentVolume
* @param name name of the PersistentVolume
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replacePersistentVolume(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/persistentvolumes/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replacePersistentVolume.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replacePersistentVolume.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1PersistentVolume")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1PersistentVolume");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace status of the specified PersistentVolume
* @param name name of the PersistentVolume
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replacePersistentVolumeStatus(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/api/v1/persistentvolumes/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replacePersistentVolumeStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replacePersistentVolumeStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1PersistentVolume")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1PersistentVolume");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.CoreV1Api = CoreV1Api;
//# sourceMappingURL=coreV1Api.js.map
/***/ }),
/***/ 36522:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.CustomObjectsApi = exports.CustomObjectsApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(4351);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var CustomObjectsApiApiKeys;
(function (CustomObjectsApiApiKeys) {
CustomObjectsApiApiKeys[CustomObjectsApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(CustomObjectsApiApiKeys = exports.CustomObjectsApiApiKeys || (exports.CustomObjectsApiApiKeys = {}));
class CustomObjectsApi {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[CustomObjectsApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* Creates a cluster scoped Custom object
* @param group The custom resource\'s group name
* @param version The custom resource\'s version
* @param plural The custom resource\'s plural name. For TPRs this would be lowercase plural kind.
* @param body The JSON schema of the Resource to create.
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
*/
async createClusterCustomObject(group, version, plural, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/{group}/{version}/{plural}'
.replace('{' + 'group' + '}', encodeURIComponent(String(group)))
.replace('{' + 'version' + '}', encodeURIComponent(String(version)))
.replace('{' + 'plural' + '}', encodeURIComponent(String(plural)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'group' is not null or undefined
if (group === null || group === undefined) {
throw new Error('Required parameter group was null or undefined when calling createClusterCustomObject.');
}
// verify required parameter 'version' is not null or undefined
if (version === null || version === undefined) {
throw new Error('Required parameter version was null or undefined when calling createClusterCustomObject.');
}
// verify required parameter 'plural' is not null or undefined
if (plural === null || plural === undefined) {
throw new Error('Required parameter plural was null or undefined when calling createClusterCustomObject.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createClusterCustomObject.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "object");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* Creates a namespace scoped Custom object
* @param group The custom resource\'s group name
* @param version The custom resource\'s version
* @param namespace The custom resource\'s namespace
* @param plural The custom resource\'s plural name. For TPRs this would be lowercase plural kind.
* @param body The JSON schema of the Resource to create.
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createNamespacedCustomObject(group, version, namespace, plural, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/{group}/{version}/namespaces/{namespace}/{plural}'
.replace('{' + 'group' + '}', encodeURIComponent(String(group)))
.replace('{' + 'version' + '}', encodeURIComponent(String(version)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))
.replace('{' + 'plural' + '}', encodeURIComponent(String(plural)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'group' is not null or undefined
if (group === null || group === undefined) {
throw new Error('Required parameter group was null or undefined when calling createNamespacedCustomObject.');
}
// verify required parameter 'version' is not null or undefined
if (version === null || version === undefined) {
throw new Error('Required parameter version was null or undefined when calling createNamespacedCustomObject.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling createNamespacedCustomObject.');
}
// verify required parameter 'plural' is not null or undefined
if (plural === null || plural === undefined) {
throw new Error('Required parameter plural was null or undefined when calling createNamespacedCustomObject.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createNamespacedCustomObject.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "object");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* Deletes the specified cluster scoped custom object
* @param group the custom resource\'s group
* @param version the custom resource\'s version
* @param plural the custom object\'s plural name. For TPRs this would be lowercase plural kind.
* @param name the custom object\'s name
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param body
*/
async deleteClusterCustomObject(group, version, plural, name, gracePeriodSeconds, orphanDependents, propagationPolicy, dryRun, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/{group}/{version}/{plural}/{name}'
.replace('{' + 'group' + '}', encodeURIComponent(String(group)))
.replace('{' + 'version' + '}', encodeURIComponent(String(version)))
.replace('{' + 'plural' + '}', encodeURIComponent(String(plural)))
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'group' is not null or undefined
if (group === null || group === undefined) {
throw new Error('Required parameter group was null or undefined when calling deleteClusterCustomObject.');
}
// verify required parameter 'version' is not null or undefined
if (version === null || version === undefined) {
throw new Error('Required parameter version was null or undefined when calling deleteClusterCustomObject.');
}
// verify required parameter 'plural' is not null or undefined
if (plural === null || plural === undefined) {
throw new Error('Required parameter plural was null or undefined when calling deleteClusterCustomObject.');
}
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteClusterCustomObject.');
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "object");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* Delete collection of cluster scoped custom objects
* @param group The custom resource\'s group name
* @param version The custom resource\'s version
* @param plural The custom resource\'s plural name. For TPRs this would be lowercase plural kind.
* @param pretty If \'true\', then the output is pretty printed.
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param body
*/
async deleteCollectionClusterCustomObject(group, version, plural, pretty, gracePeriodSeconds, orphanDependents, propagationPolicy, dryRun, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/{group}/{version}/{plural}'
.replace('{' + 'group' + '}', encodeURIComponent(String(group)))
.replace('{' + 'version' + '}', encodeURIComponent(String(version)))
.replace('{' + 'plural' + '}', encodeURIComponent(String(plural)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'group' is not null or undefined
if (group === null || group === undefined) {
throw new Error('Required parameter group was null or undefined when calling deleteCollectionClusterCustomObject.');
}
// verify required parameter 'version' is not null or undefined
if (version === null || version === undefined) {
throw new Error('Required parameter version was null or undefined when calling deleteCollectionClusterCustomObject.');
}
// verify required parameter 'plural' is not null or undefined
if (plural === null || plural === undefined) {
throw new Error('Required parameter plural was null or undefined when calling deleteCollectionClusterCustomObject.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "object");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* Delete collection of namespace scoped custom objects
* @param group The custom resource\'s group name
* @param version The custom resource\'s version
* @param namespace The custom resource\'s namespace
* @param plural The custom resource\'s plural name. For TPRs this would be lowercase plural kind.
* @param pretty If \'true\', then the output is pretty printed.
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param body
*/
async deleteCollectionNamespacedCustomObject(group, version, namespace, plural, pretty, gracePeriodSeconds, orphanDependents, propagationPolicy, dryRun, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/{group}/{version}/namespaces/{namespace}/{plural}'
.replace('{' + 'group' + '}', encodeURIComponent(String(group)))
.replace('{' + 'version' + '}', encodeURIComponent(String(version)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))
.replace('{' + 'plural' + '}', encodeURIComponent(String(plural)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'group' is not null or undefined
if (group === null || group === undefined) {
throw new Error('Required parameter group was null or undefined when calling deleteCollectionNamespacedCustomObject.');
}
// verify required parameter 'version' is not null or undefined
if (version === null || version === undefined) {
throw new Error('Required parameter version was null or undefined when calling deleteCollectionNamespacedCustomObject.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedCustomObject.');
}
// verify required parameter 'plural' is not null or undefined
if (plural === null || plural === undefined) {
throw new Error('Required parameter plural was null or undefined when calling deleteCollectionNamespacedCustomObject.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "object");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* Deletes the specified namespace scoped custom object
* @param group the custom resource\'s group
* @param version the custom resource\'s version
* @param namespace The custom resource\'s namespace
* @param plural the custom resource\'s plural name. For TPRs this would be lowercase plural kind.
* @param name the custom object\'s name
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param body
*/
async deleteNamespacedCustomObject(group, version, namespace, plural, name, gracePeriodSeconds, orphanDependents, propagationPolicy, dryRun, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}'
.replace('{' + 'group' + '}', encodeURIComponent(String(group)))
.replace('{' + 'version' + '}', encodeURIComponent(String(version)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))
.replace('{' + 'plural' + '}', encodeURIComponent(String(plural)))
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'group' is not null or undefined
if (group === null || group === undefined) {
throw new Error('Required parameter group was null or undefined when calling deleteNamespacedCustomObject.');
}
// verify required parameter 'version' is not null or undefined
if (version === null || version === undefined) {
throw new Error('Required parameter version was null or undefined when calling deleteNamespacedCustomObject.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedCustomObject.');
}
// verify required parameter 'plural' is not null or undefined
if (plural === null || plural === undefined) {
throw new Error('Required parameter plural was null or undefined when calling deleteNamespacedCustomObject.');
}
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteNamespacedCustomObject.');
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "object");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* Returns a cluster scoped custom object
* @param group the custom resource\'s group
* @param version the custom resource\'s version
* @param plural the custom object\'s plural name. For TPRs this would be lowercase plural kind.
* @param name the custom object\'s name
*/
async getClusterCustomObject(group, version, plural, name, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/{group}/{version}/{plural}/{name}'
.replace('{' + 'group' + '}', encodeURIComponent(String(group)))
.replace('{' + 'version' + '}', encodeURIComponent(String(version)))
.replace('{' + 'plural' + '}', encodeURIComponent(String(plural)))
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'group' is not null or undefined
if (group === null || group === undefined) {
throw new Error('Required parameter group was null or undefined when calling getClusterCustomObject.');
}
// verify required parameter 'version' is not null or undefined
if (version === null || version === undefined) {
throw new Error('Required parameter version was null or undefined when calling getClusterCustomObject.');
}
// verify required parameter 'plural' is not null or undefined
if (plural === null || plural === undefined) {
throw new Error('Required parameter plural was null or undefined when calling getClusterCustomObject.');
}
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling getClusterCustomObject.');
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "object");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read scale of the specified custom object
* @param group the custom resource\'s group
* @param version the custom resource\'s version
* @param plural the custom resource\'s plural name. For TPRs this would be lowercase plural kind.
* @param name the custom object\'s name
*/
async getClusterCustomObjectScale(group, version, plural, name, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/{group}/{version}/{plural}/{name}/scale'
.replace('{' + 'group' + '}', encodeURIComponent(String(group)))
.replace('{' + 'version' + '}', encodeURIComponent(String(version)))
.replace('{' + 'plural' + '}', encodeURIComponent(String(plural)))
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'group' is not null or undefined
if (group === null || group === undefined) {
throw new Error('Required parameter group was null or undefined when calling getClusterCustomObjectScale.');
}
// verify required parameter 'version' is not null or undefined
if (version === null || version === undefined) {
throw new Error('Required parameter version was null or undefined when calling getClusterCustomObjectScale.');
}
// verify required parameter 'plural' is not null or undefined
if (plural === null || plural === undefined) {
throw new Error('Required parameter plural was null or undefined when calling getClusterCustomObjectScale.');
}
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling getClusterCustomObjectScale.');
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "object");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read status of the specified cluster scoped custom object
* @param group the custom resource\'s group
* @param version the custom resource\'s version
* @param plural the custom resource\'s plural name. For TPRs this would be lowercase plural kind.
* @param name the custom object\'s name
*/
async getClusterCustomObjectStatus(group, version, plural, name, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/{group}/{version}/{plural}/{name}/status'
.replace('{' + 'group' + '}', encodeURIComponent(String(group)))
.replace('{' + 'version' + '}', encodeURIComponent(String(version)))
.replace('{' + 'plural' + '}', encodeURIComponent(String(plural)))
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'group' is not null or undefined
if (group === null || group === undefined) {
throw new Error('Required parameter group was null or undefined when calling getClusterCustomObjectStatus.');
}
// verify required parameter 'version' is not null or undefined
if (version === null || version === undefined) {
throw new Error('Required parameter version was null or undefined when calling getClusterCustomObjectStatus.');
}
// verify required parameter 'plural' is not null or undefined
if (plural === null || plural === undefined) {
throw new Error('Required parameter plural was null or undefined when calling getClusterCustomObjectStatus.');
}
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling getClusterCustomObjectStatus.');
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "object");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* Returns a namespace scoped custom object
* @param group the custom resource\'s group
* @param version the custom resource\'s version
* @param namespace The custom resource\'s namespace
* @param plural the custom resource\'s plural name. For TPRs this would be lowercase plural kind.
* @param name the custom object\'s name
*/
async getNamespacedCustomObject(group, version, namespace, plural, name, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}'
.replace('{' + 'group' + '}', encodeURIComponent(String(group)))
.replace('{' + 'version' + '}', encodeURIComponent(String(version)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))
.replace('{' + 'plural' + '}', encodeURIComponent(String(plural)))
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'group' is not null or undefined
if (group === null || group === undefined) {
throw new Error('Required parameter group was null or undefined when calling getNamespacedCustomObject.');
}
// verify required parameter 'version' is not null or undefined
if (version === null || version === undefined) {
throw new Error('Required parameter version was null or undefined when calling getNamespacedCustomObject.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling getNamespacedCustomObject.');
}
// verify required parameter 'plural' is not null or undefined
if (plural === null || plural === undefined) {
throw new Error('Required parameter plural was null or undefined when calling getNamespacedCustomObject.');
}
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling getNamespacedCustomObject.');
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "object");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read scale of the specified namespace scoped custom object
* @param group the custom resource\'s group
* @param version the custom resource\'s version
* @param namespace The custom resource\'s namespace
* @param plural the custom resource\'s plural name. For TPRs this would be lowercase plural kind.
* @param name the custom object\'s name
*/
async getNamespacedCustomObjectScale(group, version, namespace, plural, name, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}/scale'
.replace('{' + 'group' + '}', encodeURIComponent(String(group)))
.replace('{' + 'version' + '}', encodeURIComponent(String(version)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))
.replace('{' + 'plural' + '}', encodeURIComponent(String(plural)))
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'group' is not null or undefined
if (group === null || group === undefined) {
throw new Error('Required parameter group was null or undefined when calling getNamespacedCustomObjectScale.');
}
// verify required parameter 'version' is not null or undefined
if (version === null || version === undefined) {
throw new Error('Required parameter version was null or undefined when calling getNamespacedCustomObjectScale.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling getNamespacedCustomObjectScale.');
}
// verify required parameter 'plural' is not null or undefined
if (plural === null || plural === undefined) {
throw new Error('Required parameter plural was null or undefined when calling getNamespacedCustomObjectScale.');
}
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling getNamespacedCustomObjectScale.');
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "object");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read status of the specified namespace scoped custom object
* @param group the custom resource\'s group
* @param version the custom resource\'s version
* @param namespace The custom resource\'s namespace
* @param plural the custom resource\'s plural name. For TPRs this would be lowercase plural kind.
* @param name the custom object\'s name
*/
async getNamespacedCustomObjectStatus(group, version, namespace, plural, name, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}/status'
.replace('{' + 'group' + '}', encodeURIComponent(String(group)))
.replace('{' + 'version' + '}', encodeURIComponent(String(version)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))
.replace('{' + 'plural' + '}', encodeURIComponent(String(plural)))
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'group' is not null or undefined
if (group === null || group === undefined) {
throw new Error('Required parameter group was null or undefined when calling getNamespacedCustomObjectStatus.');
}
// verify required parameter 'version' is not null or undefined
if (version === null || version === undefined) {
throw new Error('Required parameter version was null or undefined when calling getNamespacedCustomObjectStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling getNamespacedCustomObjectStatus.');
}
// verify required parameter 'plural' is not null or undefined
if (plural === null || plural === undefined) {
throw new Error('Required parameter plural was null or undefined when calling getNamespacedCustomObjectStatus.');
}
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling getNamespacedCustomObjectStatus.');
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "object");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch cluster scoped custom objects
* @param group The custom resource\'s group name
* @param version The custom resource\'s version
* @param plural The custom resource\'s plural name. For TPRs this would be lowercase plural kind.
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it\'s 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications.
*/
async listClusterCustomObject(group, version, plural, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/{group}/{version}/{plural}'
.replace('{' + 'group' + '}', encodeURIComponent(String(group)))
.replace('{' + 'version' + '}', encodeURIComponent(String(version)))
.replace('{' + 'plural' + '}', encodeURIComponent(String(plural)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/json;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'group' is not null or undefined
if (group === null || group === undefined) {
throw new Error('Required parameter group was null or undefined when calling listClusterCustomObject.');
}
// verify required parameter 'version' is not null or undefined
if (version === null || version === undefined) {
throw new Error('Required parameter version was null or undefined when calling listClusterCustomObject.');
}
// verify required parameter 'plural' is not null or undefined
if (plural === null || plural === undefined) {
throw new Error('Required parameter plural was null or undefined when calling listClusterCustomObject.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "object");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch namespace scoped custom objects
* @param group The custom resource\'s group name
* @param version The custom resource\'s version
* @param namespace The custom resource\'s namespace
* @param plural The custom resource\'s plural name. For TPRs this would be lowercase plural kind.
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it\'s 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications.
*/
async listNamespacedCustomObject(group, version, namespace, plural, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/{group}/{version}/namespaces/{namespace}/{plural}'
.replace('{' + 'group' + '}', encodeURIComponent(String(group)))
.replace('{' + 'version' + '}', encodeURIComponent(String(version)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))
.replace('{' + 'plural' + '}', encodeURIComponent(String(plural)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/json;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'group' is not null or undefined
if (group === null || group === undefined) {
throw new Error('Required parameter group was null or undefined when calling listNamespacedCustomObject.');
}
// verify required parameter 'version' is not null or undefined
if (version === null || version === undefined) {
throw new Error('Required parameter version was null or undefined when calling listNamespacedCustomObject.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling listNamespacedCustomObject.');
}
// verify required parameter 'plural' is not null or undefined
if (plural === null || plural === undefined) {
throw new Error('Required parameter plural was null or undefined when calling listNamespacedCustomObject.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "object");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* patch the specified cluster scoped custom object
* @param group the custom resource\'s group
* @param version the custom resource\'s version
* @param plural the custom object\'s plural name. For TPRs this would be lowercase plural kind.
* @param name the custom object\'s name
* @param body The JSON schema of the Resource to patch.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchClusterCustomObject(group, version, plural, name, body, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/{group}/{version}/{plural}/{name}'
.replace('{' + 'group' + '}', encodeURIComponent(String(group)))
.replace('{' + 'version' + '}', encodeURIComponent(String(version)))
.replace('{' + 'plural' + '}', encodeURIComponent(String(plural)))
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'group' is not null or undefined
if (group === null || group === undefined) {
throw new Error('Required parameter group was null or undefined when calling patchClusterCustomObject.');
}
// verify required parameter 'version' is not null or undefined
if (version === null || version === undefined) {
throw new Error('Required parameter version was null or undefined when calling patchClusterCustomObject.');
}
// verify required parameter 'plural' is not null or undefined
if (plural === null || plural === undefined) {
throw new Error('Required parameter plural was null or undefined when calling patchClusterCustomObject.');
}
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchClusterCustomObject.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchClusterCustomObject.');
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "object");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update scale of the specified cluster scoped custom object
* @param group the custom resource\'s group
* @param version the custom resource\'s version
* @param plural the custom resource\'s plural name. For TPRs this would be lowercase plural kind.
* @param name the custom object\'s name
* @param body
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchClusterCustomObjectScale(group, version, plural, name, body, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/{group}/{version}/{plural}/{name}/scale'
.replace('{' + 'group' + '}', encodeURIComponent(String(group)))
.replace('{' + 'version' + '}', encodeURIComponent(String(version)))
.replace('{' + 'plural' + '}', encodeURIComponent(String(plural)))
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'group' is not null or undefined
if (group === null || group === undefined) {
throw new Error('Required parameter group was null or undefined when calling patchClusterCustomObjectScale.');
}
// verify required parameter 'version' is not null or undefined
if (version === null || version === undefined) {
throw new Error('Required parameter version was null or undefined when calling patchClusterCustomObjectScale.');
}
// verify required parameter 'plural' is not null or undefined
if (plural === null || plural === undefined) {
throw new Error('Required parameter plural was null or undefined when calling patchClusterCustomObjectScale.');
}
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchClusterCustomObjectScale.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchClusterCustomObjectScale.');
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "object");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update status of the specified cluster scoped custom object
* @param group the custom resource\'s group
* @param version the custom resource\'s version
* @param plural the custom resource\'s plural name. For TPRs this would be lowercase plural kind.
* @param name the custom object\'s name
* @param body
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchClusterCustomObjectStatus(group, version, plural, name, body, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/{group}/{version}/{plural}/{name}/status'
.replace('{' + 'group' + '}', encodeURIComponent(String(group)))
.replace('{' + 'version' + '}', encodeURIComponent(String(version)))
.replace('{' + 'plural' + '}', encodeURIComponent(String(plural)))
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'group' is not null or undefined
if (group === null || group === undefined) {
throw new Error('Required parameter group was null or undefined when calling patchClusterCustomObjectStatus.');
}
// verify required parameter 'version' is not null or undefined
if (version === null || version === undefined) {
throw new Error('Required parameter version was null or undefined when calling patchClusterCustomObjectStatus.');
}
// verify required parameter 'plural' is not null or undefined
if (plural === null || plural === undefined) {
throw new Error('Required parameter plural was null or undefined when calling patchClusterCustomObjectStatus.');
}
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchClusterCustomObjectStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchClusterCustomObjectStatus.');
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "object");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* patch the specified namespace scoped custom object
* @param group the custom resource\'s group
* @param version the custom resource\'s version
* @param namespace The custom resource\'s namespace
* @param plural the custom resource\'s plural name. For TPRs this would be lowercase plural kind.
* @param name the custom object\'s name
* @param body The JSON schema of the Resource to patch.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedCustomObject(group, version, namespace, plural, name, body, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}'
.replace('{' + 'group' + '}', encodeURIComponent(String(group)))
.replace('{' + 'version' + '}', encodeURIComponent(String(version)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))
.replace('{' + 'plural' + '}', encodeURIComponent(String(plural)))
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'group' is not null or undefined
if (group === null || group === undefined) {
throw new Error('Required parameter group was null or undefined when calling patchNamespacedCustomObject.');
}
// verify required parameter 'version' is not null or undefined
if (version === null || version === undefined) {
throw new Error('Required parameter version was null or undefined when calling patchNamespacedCustomObject.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedCustomObject.');
}
// verify required parameter 'plural' is not null or undefined
if (plural === null || plural === undefined) {
throw new Error('Required parameter plural was null or undefined when calling patchNamespacedCustomObject.');
}
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedCustomObject.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedCustomObject.');
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "object");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update scale of the specified namespace scoped custom object
* @param group the custom resource\'s group
* @param version the custom resource\'s version
* @param namespace The custom resource\'s namespace
* @param plural the custom resource\'s plural name. For TPRs this would be lowercase plural kind.
* @param name the custom object\'s name
* @param body
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedCustomObjectScale(group, version, namespace, plural, name, body, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}/scale'
.replace('{' + 'group' + '}', encodeURIComponent(String(group)))
.replace('{' + 'version' + '}', encodeURIComponent(String(version)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))
.replace('{' + 'plural' + '}', encodeURIComponent(String(plural)))
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'group' is not null or undefined
if (group === null || group === undefined) {
throw new Error('Required parameter group was null or undefined when calling patchNamespacedCustomObjectScale.');
}
// verify required parameter 'version' is not null or undefined
if (version === null || version === undefined) {
throw new Error('Required parameter version was null or undefined when calling patchNamespacedCustomObjectScale.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedCustomObjectScale.');
}
// verify required parameter 'plural' is not null or undefined
if (plural === null || plural === undefined) {
throw new Error('Required parameter plural was null or undefined when calling patchNamespacedCustomObjectScale.');
}
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedCustomObjectScale.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedCustomObjectScale.');
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "object");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update status of the specified namespace scoped custom object
* @param group the custom resource\'s group
* @param version the custom resource\'s version
* @param namespace The custom resource\'s namespace
* @param plural the custom resource\'s plural name. For TPRs this would be lowercase plural kind.
* @param name the custom object\'s name
* @param body
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedCustomObjectStatus(group, version, namespace, plural, name, body, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}/status'
.replace('{' + 'group' + '}', encodeURIComponent(String(group)))
.replace('{' + 'version' + '}', encodeURIComponent(String(version)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))
.replace('{' + 'plural' + '}', encodeURIComponent(String(plural)))
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'group' is not null or undefined
if (group === null || group === undefined) {
throw new Error('Required parameter group was null or undefined when calling patchNamespacedCustomObjectStatus.');
}
// verify required parameter 'version' is not null or undefined
if (version === null || version === undefined) {
throw new Error('Required parameter version was null or undefined when calling patchNamespacedCustomObjectStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedCustomObjectStatus.');
}
// verify required parameter 'plural' is not null or undefined
if (plural === null || plural === undefined) {
throw new Error('Required parameter plural was null or undefined when calling patchNamespacedCustomObjectStatus.');
}
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedCustomObjectStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedCustomObjectStatus.');
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "object");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified cluster scoped custom object
* @param group the custom resource\'s group
* @param version the custom resource\'s version
* @param plural the custom object\'s plural name. For TPRs this would be lowercase plural kind.
* @param name the custom object\'s name
* @param body The JSON schema of the Resource to replace.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceClusterCustomObject(group, version, plural, name, body, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/{group}/{version}/{plural}/{name}'
.replace('{' + 'group' + '}', encodeURIComponent(String(group)))
.replace('{' + 'version' + '}', encodeURIComponent(String(version)))
.replace('{' + 'plural' + '}', encodeURIComponent(String(plural)))
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'group' is not null or undefined
if (group === null || group === undefined) {
throw new Error('Required parameter group was null or undefined when calling replaceClusterCustomObject.');
}
// verify required parameter 'version' is not null or undefined
if (version === null || version === undefined) {
throw new Error('Required parameter version was null or undefined when calling replaceClusterCustomObject.');
}
// verify required parameter 'plural' is not null or undefined
if (plural === null || plural === undefined) {
throw new Error('Required parameter plural was null or undefined when calling replaceClusterCustomObject.');
}
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceClusterCustomObject.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceClusterCustomObject.');
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "object");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace scale of the specified cluster scoped custom object
* @param group the custom resource\'s group
* @param version the custom resource\'s version
* @param plural the custom resource\'s plural name. For TPRs this would be lowercase plural kind.
* @param name the custom object\'s name
* @param body
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceClusterCustomObjectScale(group, version, plural, name, body, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/{group}/{version}/{plural}/{name}/scale'
.replace('{' + 'group' + '}', encodeURIComponent(String(group)))
.replace('{' + 'version' + '}', encodeURIComponent(String(version)))
.replace('{' + 'plural' + '}', encodeURIComponent(String(plural)))
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'group' is not null or undefined
if (group === null || group === undefined) {
throw new Error('Required parameter group was null or undefined when calling replaceClusterCustomObjectScale.');
}
// verify required parameter 'version' is not null or undefined
if (version === null || version === undefined) {
throw new Error('Required parameter version was null or undefined when calling replaceClusterCustomObjectScale.');
}
// verify required parameter 'plural' is not null or undefined
if (plural === null || plural === undefined) {
throw new Error('Required parameter plural was null or undefined when calling replaceClusterCustomObjectScale.');
}
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceClusterCustomObjectScale.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceClusterCustomObjectScale.');
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "object");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace status of the cluster scoped specified custom object
* @param group the custom resource\'s group
* @param version the custom resource\'s version
* @param plural the custom resource\'s plural name. For TPRs this would be lowercase plural kind.
* @param name the custom object\'s name
* @param body
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceClusterCustomObjectStatus(group, version, plural, name, body, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/{group}/{version}/{plural}/{name}/status'
.replace('{' + 'group' + '}', encodeURIComponent(String(group)))
.replace('{' + 'version' + '}', encodeURIComponent(String(version)))
.replace('{' + 'plural' + '}', encodeURIComponent(String(plural)))
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'group' is not null or undefined
if (group === null || group === undefined) {
throw new Error('Required parameter group was null or undefined when calling replaceClusterCustomObjectStatus.');
}
// verify required parameter 'version' is not null or undefined
if (version === null || version === undefined) {
throw new Error('Required parameter version was null or undefined when calling replaceClusterCustomObjectStatus.');
}
// verify required parameter 'plural' is not null or undefined
if (plural === null || plural === undefined) {
throw new Error('Required parameter plural was null or undefined when calling replaceClusterCustomObjectStatus.');
}
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceClusterCustomObjectStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceClusterCustomObjectStatus.');
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "object");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified namespace scoped custom object
* @param group the custom resource\'s group
* @param version the custom resource\'s version
* @param namespace The custom resource\'s namespace
* @param plural the custom resource\'s plural name. For TPRs this would be lowercase plural kind.
* @param name the custom object\'s name
* @param body The JSON schema of the Resource to replace.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedCustomObject(group, version, namespace, plural, name, body, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}'
.replace('{' + 'group' + '}', encodeURIComponent(String(group)))
.replace('{' + 'version' + '}', encodeURIComponent(String(version)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))
.replace('{' + 'plural' + '}', encodeURIComponent(String(plural)))
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'group' is not null or undefined
if (group === null || group === undefined) {
throw new Error('Required parameter group was null or undefined when calling replaceNamespacedCustomObject.');
}
// verify required parameter 'version' is not null or undefined
if (version === null || version === undefined) {
throw new Error('Required parameter version was null or undefined when calling replaceNamespacedCustomObject.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedCustomObject.');
}
// verify required parameter 'plural' is not null or undefined
if (plural === null || plural === undefined) {
throw new Error('Required parameter plural was null or undefined when calling replaceNamespacedCustomObject.');
}
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedCustomObject.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedCustomObject.');
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "object");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace scale of the specified namespace scoped custom object
* @param group the custom resource\'s group
* @param version the custom resource\'s version
* @param namespace The custom resource\'s namespace
* @param plural the custom resource\'s plural name. For TPRs this would be lowercase plural kind.
* @param name the custom object\'s name
* @param body
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedCustomObjectScale(group, version, namespace, plural, name, body, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}/scale'
.replace('{' + 'group' + '}', encodeURIComponent(String(group)))
.replace('{' + 'version' + '}', encodeURIComponent(String(version)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))
.replace('{' + 'plural' + '}', encodeURIComponent(String(plural)))
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'group' is not null or undefined
if (group === null || group === undefined) {
throw new Error('Required parameter group was null or undefined when calling replaceNamespacedCustomObjectScale.');
}
// verify required parameter 'version' is not null or undefined
if (version === null || version === undefined) {
throw new Error('Required parameter version was null or undefined when calling replaceNamespacedCustomObjectScale.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedCustomObjectScale.');
}
// verify required parameter 'plural' is not null or undefined
if (plural === null || plural === undefined) {
throw new Error('Required parameter plural was null or undefined when calling replaceNamespacedCustomObjectScale.');
}
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedCustomObjectScale.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedCustomObjectScale.');
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "object");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace status of the specified namespace scoped custom object
* @param group the custom resource\'s group
* @param version the custom resource\'s version
* @param namespace The custom resource\'s namespace
* @param plural the custom resource\'s plural name. For TPRs this would be lowercase plural kind.
* @param name the custom object\'s name
* @param body
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedCustomObjectStatus(group, version, namespace, plural, name, body, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}/status'
.replace('{' + 'group' + '}', encodeURIComponent(String(group)))
.replace('{' + 'version' + '}', encodeURIComponent(String(version)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))
.replace('{' + 'plural' + '}', encodeURIComponent(String(plural)))
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'group' is not null or undefined
if (group === null || group === undefined) {
throw new Error('Required parameter group was null or undefined when calling replaceNamespacedCustomObjectStatus.');
}
// verify required parameter 'version' is not null or undefined
if (version === null || version === undefined) {
throw new Error('Required parameter version was null or undefined when calling replaceNamespacedCustomObjectStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedCustomObjectStatus.');
}
// verify required parameter 'plural' is not null or undefined
if (plural === null || plural === undefined) {
throw new Error('Required parameter plural was null or undefined when calling replaceNamespacedCustomObjectStatus.');
}
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedCustomObjectStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedCustomObjectStatus.');
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "object");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.CustomObjectsApi = CustomObjectsApi;
//# sourceMappingURL=customObjectsApi.js.map
/***/ }),
/***/ 44310:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.DiscoveryApi = exports.DiscoveryApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(4351);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var DiscoveryApiApiKeys;
(function (DiscoveryApiApiKeys) {
DiscoveryApiApiKeys[DiscoveryApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(DiscoveryApiApiKeys = exports.DiscoveryApiApiKeys || (exports.DiscoveryApiApiKeys = {}));
class DiscoveryApi {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[DiscoveryApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* get information of a group
*/
async getAPIGroup(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/discovery.k8s.io/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIGroup");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.DiscoveryApi = DiscoveryApi;
//# sourceMappingURL=discoveryApi.js.map
/***/ }),
/***/ 9089:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.DiscoveryV1Api = exports.DiscoveryV1ApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(4351);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var DiscoveryV1ApiApiKeys;
(function (DiscoveryV1ApiApiKeys) {
DiscoveryV1ApiApiKeys[DiscoveryV1ApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(DiscoveryV1ApiApiKeys = exports.DiscoveryV1ApiApiKeys || (exports.DiscoveryV1ApiApiKeys = {}));
class DiscoveryV1Api {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[DiscoveryV1ApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* create an EndpointSlice
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createNamespacedEndpointSlice(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling createNamespacedEndpointSlice.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createNamespacedEndpointSlice.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1EndpointSlice")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1EndpointSlice");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of EndpointSlice
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionNamespacedEndpointSlice(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedEndpointSlice.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete an EndpointSlice
* @param name name of the EndpointSlice
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param body
*/
async deleteNamespacedEndpointSlice(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteNamespacedEndpointSlice.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedEndpointSlice.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* get available resources
*/
async getAPIResources(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/discovery.k8s.io/v1/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind EndpointSlice
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param pretty If \'true\', then the output is pretty printed.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listEndpointSliceForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/discovery.k8s.io/v1/endpointslices';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1EndpointSliceList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind EndpointSlice
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listNamespacedEndpointSlice(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling listNamespacedEndpointSlice.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1EndpointSliceList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified EndpointSlice
* @param name name of the EndpointSlice
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedEndpointSlice(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedEndpointSlice.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedEndpointSlice.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedEndpointSlice.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1EndpointSlice");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified EndpointSlice
* @param name name of the EndpointSlice
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedEndpointSlice(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedEndpointSlice.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedEndpointSlice.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1EndpointSlice");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified EndpointSlice
* @param name name of the EndpointSlice
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedEndpointSlice(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedEndpointSlice.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedEndpointSlice.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedEndpointSlice.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1EndpointSlice")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1EndpointSlice");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.DiscoveryV1Api = DiscoveryV1Api;
//# sourceMappingURL=discoveryV1Api.js.map
/***/ }),
/***/ 10420:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.DiscoveryV1beta1Api = exports.DiscoveryV1beta1ApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(4351);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var DiscoveryV1beta1ApiApiKeys;
(function (DiscoveryV1beta1ApiApiKeys) {
DiscoveryV1beta1ApiApiKeys[DiscoveryV1beta1ApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(DiscoveryV1beta1ApiApiKeys = exports.DiscoveryV1beta1ApiApiKeys || (exports.DiscoveryV1beta1ApiApiKeys = {}));
class DiscoveryV1beta1Api {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[DiscoveryV1beta1ApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* create an EndpointSlice
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createNamespacedEndpointSlice(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/discovery.k8s.io/v1beta1/namespaces/{namespace}/endpointslices'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling createNamespacedEndpointSlice.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createNamespacedEndpointSlice.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1beta1EndpointSlice")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1EndpointSlice");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of EndpointSlice
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionNamespacedEndpointSlice(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/discovery.k8s.io/v1beta1/namespaces/{namespace}/endpointslices'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedEndpointSlice.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete an EndpointSlice
* @param name name of the EndpointSlice
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param body
*/
async deleteNamespacedEndpointSlice(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/discovery.k8s.io/v1beta1/namespaces/{namespace}/endpointslices/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteNamespacedEndpointSlice.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedEndpointSlice.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* get available resources
*/
async getAPIResources(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/discovery.k8s.io/v1beta1/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind EndpointSlice
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param pretty If \'true\', then the output is pretty printed.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listEndpointSliceForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/discovery.k8s.io/v1beta1/endpointslices';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1EndpointSliceList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind EndpointSlice
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listNamespacedEndpointSlice(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/discovery.k8s.io/v1beta1/namespaces/{namespace}/endpointslices'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling listNamespacedEndpointSlice.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1EndpointSliceList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified EndpointSlice
* @param name name of the EndpointSlice
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedEndpointSlice(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/discovery.k8s.io/v1beta1/namespaces/{namespace}/endpointslices/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedEndpointSlice.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedEndpointSlice.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedEndpointSlice.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1EndpointSlice");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified EndpointSlice
* @param name name of the EndpointSlice
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedEndpointSlice(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/discovery.k8s.io/v1beta1/namespaces/{namespace}/endpointslices/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedEndpointSlice.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedEndpointSlice.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1EndpointSlice");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified EndpointSlice
* @param name name of the EndpointSlice
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedEndpointSlice(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/discovery.k8s.io/v1beta1/namespaces/{namespace}/endpointslices/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedEndpointSlice.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedEndpointSlice.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedEndpointSlice.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1beta1EndpointSlice")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1EndpointSlice");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.DiscoveryV1beta1Api = DiscoveryV1beta1Api;
//# sourceMappingURL=discoveryV1beta1Api.js.map
/***/ }),
/***/ 89829:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.EventsApi = exports.EventsApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(4351);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var EventsApiApiKeys;
(function (EventsApiApiKeys) {
EventsApiApiKeys[EventsApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(EventsApiApiKeys = exports.EventsApiApiKeys || (exports.EventsApiApiKeys = {}));
class EventsApi {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[EventsApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* get information of a group
*/
async getAPIGroup(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/events.k8s.io/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIGroup");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.EventsApi = EventsApi;
//# sourceMappingURL=eventsApi.js.map
/***/ }),
/***/ 15621:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.EventsV1Api = exports.EventsV1ApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(4351);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var EventsV1ApiApiKeys;
(function (EventsV1ApiApiKeys) {
EventsV1ApiApiKeys[EventsV1ApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(EventsV1ApiApiKeys = exports.EventsV1ApiApiKeys || (exports.EventsV1ApiApiKeys = {}));
class EventsV1Api {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[EventsV1ApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* create an Event
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createNamespacedEvent(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/events.k8s.io/v1/namespaces/{namespace}/events'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling createNamespacedEvent.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createNamespacedEvent.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "EventsV1Event")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "EventsV1Event");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of Event
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionNamespacedEvent(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/events.k8s.io/v1/namespaces/{namespace}/events'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedEvent.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete an Event
* @param name name of the Event
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param body
*/
async deleteNamespacedEvent(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/events.k8s.io/v1/namespaces/{namespace}/events/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteNamespacedEvent.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedEvent.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* get available resources
*/
async getAPIResources(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/events.k8s.io/v1/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind Event
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param pretty If \'true\', then the output is pretty printed.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listEventForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/events.k8s.io/v1/events';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "EventsV1EventList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind Event
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listNamespacedEvent(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/events.k8s.io/v1/namespaces/{namespace}/events'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling listNamespacedEvent.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "EventsV1EventList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified Event
* @param name name of the Event
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedEvent(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/events.k8s.io/v1/namespaces/{namespace}/events/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedEvent.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedEvent.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedEvent.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "EventsV1Event");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified Event
* @param name name of the Event
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedEvent(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/events.k8s.io/v1/namespaces/{namespace}/events/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedEvent.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedEvent.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "EventsV1Event");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified Event
* @param name name of the Event
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedEvent(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/events.k8s.io/v1/namespaces/{namespace}/events/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedEvent.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedEvent.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedEvent.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "EventsV1Event")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "EventsV1Event");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.EventsV1Api = EventsV1Api;
//# sourceMappingURL=eventsV1Api.js.map
/***/ }),
/***/ 5821:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.EventsV1beta1Api = exports.EventsV1beta1ApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(4351);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var EventsV1beta1ApiApiKeys;
(function (EventsV1beta1ApiApiKeys) {
EventsV1beta1ApiApiKeys[EventsV1beta1ApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(EventsV1beta1ApiApiKeys = exports.EventsV1beta1ApiApiKeys || (exports.EventsV1beta1ApiApiKeys = {}));
class EventsV1beta1Api {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[EventsV1beta1ApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* create an Event
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createNamespacedEvent(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/events.k8s.io/v1beta1/namespaces/{namespace}/events'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling createNamespacedEvent.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createNamespacedEvent.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1beta1Event")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1Event");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of Event
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionNamespacedEvent(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/events.k8s.io/v1beta1/namespaces/{namespace}/events'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedEvent.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete an Event
* @param name name of the Event
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param body
*/
async deleteNamespacedEvent(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/events.k8s.io/v1beta1/namespaces/{namespace}/events/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteNamespacedEvent.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedEvent.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* get available resources
*/
async getAPIResources(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/events.k8s.io/v1beta1/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind Event
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param pretty If \'true\', then the output is pretty printed.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listEventForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/events.k8s.io/v1beta1/events';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1EventList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind Event
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listNamespacedEvent(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/events.k8s.io/v1beta1/namespaces/{namespace}/events'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling listNamespacedEvent.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1EventList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified Event
* @param name name of the Event
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedEvent(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/events.k8s.io/v1beta1/namespaces/{namespace}/events/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedEvent.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedEvent.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedEvent.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1Event");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified Event
* @param name name of the Event
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedEvent(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/events.k8s.io/v1beta1/namespaces/{namespace}/events/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedEvent.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedEvent.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1Event");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified Event
* @param name name of the Event
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedEvent(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/events.k8s.io/v1beta1/namespaces/{namespace}/events/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedEvent.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedEvent.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedEvent.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1beta1Event")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1Event");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.EventsV1beta1Api = EventsV1beta1Api;
//# sourceMappingURL=eventsV1beta1Api.js.map
/***/ }),
/***/ 16001:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.FlowcontrolApiserverApi = exports.FlowcontrolApiserverApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(4351);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var FlowcontrolApiserverApiApiKeys;
(function (FlowcontrolApiserverApiApiKeys) {
FlowcontrolApiserverApiApiKeys[FlowcontrolApiserverApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(FlowcontrolApiserverApiApiKeys = exports.FlowcontrolApiserverApiApiKeys || (exports.FlowcontrolApiserverApiApiKeys = {}));
class FlowcontrolApiserverApi {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[FlowcontrolApiserverApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* get information of a group
*/
async getAPIGroup(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIGroup");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.FlowcontrolApiserverApi = FlowcontrolApiserverApi;
//# sourceMappingURL=flowcontrolApiserverApi.js.map
/***/ }),
/***/ 58365:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.FlowcontrolApiserverV1beta1Api = exports.FlowcontrolApiserverV1beta1ApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(4351);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var FlowcontrolApiserverV1beta1ApiApiKeys;
(function (FlowcontrolApiserverV1beta1ApiApiKeys) {
FlowcontrolApiserverV1beta1ApiApiKeys[FlowcontrolApiserverV1beta1ApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(FlowcontrolApiserverV1beta1ApiApiKeys = exports.FlowcontrolApiserverV1beta1ApiApiKeys || (exports.FlowcontrolApiserverV1beta1ApiApiKeys = {}));
class FlowcontrolApiserverV1beta1Api {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[FlowcontrolApiserverV1beta1ApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* create a FlowSchema
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createFlowSchema(body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/flowschemas';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createFlowSchema.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1beta1FlowSchema")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1FlowSchema");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* create a PriorityLevelConfiguration
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createPriorityLevelConfiguration(body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/prioritylevelconfigurations';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createPriorityLevelConfiguration.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1beta1PriorityLevelConfiguration")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1PriorityLevelConfiguration");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of FlowSchema
* @param pretty If \'true\', then the output is pretty printed.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionFlowSchema(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/flowschemas';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of PriorityLevelConfiguration
* @param pretty If \'true\', then the output is pretty printed.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionPriorityLevelConfiguration(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/prioritylevelconfigurations';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a FlowSchema
* @param name name of the FlowSchema
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param body
*/
async deleteFlowSchema(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/flowschemas/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteFlowSchema.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a PriorityLevelConfiguration
* @param name name of the PriorityLevelConfiguration
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param body
*/
async deletePriorityLevelConfiguration(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/prioritylevelconfigurations/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deletePriorityLevelConfiguration.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* get available resources
*/
async getAPIResources(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind FlowSchema
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listFlowSchema(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/flowschemas';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1FlowSchemaList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind PriorityLevelConfiguration
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listPriorityLevelConfiguration(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/prioritylevelconfigurations';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1PriorityLevelConfigurationList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified FlowSchema
* @param name name of the FlowSchema
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchFlowSchema(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/flowschemas/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchFlowSchema.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchFlowSchema.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1FlowSchema");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update status of the specified FlowSchema
* @param name name of the FlowSchema
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchFlowSchemaStatus(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/flowschemas/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchFlowSchemaStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchFlowSchemaStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1FlowSchema");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified PriorityLevelConfiguration
* @param name name of the PriorityLevelConfiguration
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchPriorityLevelConfiguration(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/prioritylevelconfigurations/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchPriorityLevelConfiguration.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchPriorityLevelConfiguration.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1PriorityLevelConfiguration");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update status of the specified PriorityLevelConfiguration
* @param name name of the PriorityLevelConfiguration
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchPriorityLevelConfigurationStatus(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/prioritylevelconfigurations/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchPriorityLevelConfigurationStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchPriorityLevelConfigurationStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1PriorityLevelConfiguration");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified FlowSchema
* @param name name of the FlowSchema
* @param pretty If \'true\', then the output is pretty printed.
*/
async readFlowSchema(name, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/flowschemas/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readFlowSchema.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1FlowSchema");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read status of the specified FlowSchema
* @param name name of the FlowSchema
* @param pretty If \'true\', then the output is pretty printed.
*/
async readFlowSchemaStatus(name, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/flowschemas/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readFlowSchemaStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1FlowSchema");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified PriorityLevelConfiguration
* @param name name of the PriorityLevelConfiguration
* @param pretty If \'true\', then the output is pretty printed.
*/
async readPriorityLevelConfiguration(name, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/prioritylevelconfigurations/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readPriorityLevelConfiguration.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1PriorityLevelConfiguration");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read status of the specified PriorityLevelConfiguration
* @param name name of the PriorityLevelConfiguration
* @param pretty If \'true\', then the output is pretty printed.
*/
async readPriorityLevelConfigurationStatus(name, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/prioritylevelconfigurations/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readPriorityLevelConfigurationStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1PriorityLevelConfiguration");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified FlowSchema
* @param name name of the FlowSchema
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceFlowSchema(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/flowschemas/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceFlowSchema.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceFlowSchema.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1beta1FlowSchema")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1FlowSchema");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace status of the specified FlowSchema
* @param name name of the FlowSchema
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceFlowSchemaStatus(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/flowschemas/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceFlowSchemaStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceFlowSchemaStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1beta1FlowSchema")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1FlowSchema");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified PriorityLevelConfiguration
* @param name name of the PriorityLevelConfiguration
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replacePriorityLevelConfiguration(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/prioritylevelconfigurations/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replacePriorityLevelConfiguration.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replacePriorityLevelConfiguration.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1beta1PriorityLevelConfiguration")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1PriorityLevelConfiguration");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace status of the specified PriorityLevelConfiguration
* @param name name of the PriorityLevelConfiguration
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replacePriorityLevelConfigurationStatus(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/prioritylevelconfigurations/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replacePriorityLevelConfigurationStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replacePriorityLevelConfigurationStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1beta1PriorityLevelConfiguration")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1PriorityLevelConfiguration");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.FlowcontrolApiserverV1beta1Api = FlowcontrolApiserverV1beta1Api;
//# sourceMappingURL=flowcontrolApiserverV1beta1Api.js.map
/***/ }),
/***/ 31857:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.InternalApiserverApi = exports.InternalApiserverApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(4351);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var InternalApiserverApiApiKeys;
(function (InternalApiserverApiApiKeys) {
InternalApiserverApiApiKeys[InternalApiserverApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(InternalApiserverApiApiKeys = exports.InternalApiserverApiApiKeys || (exports.InternalApiserverApiApiKeys = {}));
class InternalApiserverApi {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[InternalApiserverApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* get information of a group
*/
async getAPIGroup(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/internal.apiserver.k8s.io/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIGroup");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.InternalApiserverApi = InternalApiserverApi;
//# sourceMappingURL=internalApiserverApi.js.map
/***/ }),
/***/ 76012:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.InternalApiserverV1alpha1Api = exports.InternalApiserverV1alpha1ApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(4351);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var InternalApiserverV1alpha1ApiApiKeys;
(function (InternalApiserverV1alpha1ApiApiKeys) {
InternalApiserverV1alpha1ApiApiKeys[InternalApiserverV1alpha1ApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(InternalApiserverV1alpha1ApiApiKeys = exports.InternalApiserverV1alpha1ApiApiKeys || (exports.InternalApiserverV1alpha1ApiApiKeys = {}));
class InternalApiserverV1alpha1Api {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[InternalApiserverV1alpha1ApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* create a StorageVersion
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createStorageVersion(body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/internal.apiserver.k8s.io/v1alpha1/storageversions';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createStorageVersion.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1alpha1StorageVersion")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1StorageVersion");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of StorageVersion
* @param pretty If \'true\', then the output is pretty printed.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionStorageVersion(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/internal.apiserver.k8s.io/v1alpha1/storageversions';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a StorageVersion
* @param name name of the StorageVersion
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param body
*/
async deleteStorageVersion(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteStorageVersion.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* get available resources
*/
async getAPIResources(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/internal.apiserver.k8s.io/v1alpha1/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind StorageVersion
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listStorageVersion(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/internal.apiserver.k8s.io/v1alpha1/storageversions';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1StorageVersionList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified StorageVersion
* @param name name of the StorageVersion
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchStorageVersion(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchStorageVersion.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchStorageVersion.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1StorageVersion");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update status of the specified StorageVersion
* @param name name of the StorageVersion
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchStorageVersionStatus(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchStorageVersionStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchStorageVersionStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1StorageVersion");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified StorageVersion
* @param name name of the StorageVersion
* @param pretty If \'true\', then the output is pretty printed.
*/
async readStorageVersion(name, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readStorageVersion.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1StorageVersion");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read status of the specified StorageVersion
* @param name name of the StorageVersion
* @param pretty If \'true\', then the output is pretty printed.
*/
async readStorageVersionStatus(name, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readStorageVersionStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1StorageVersion");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified StorageVersion
* @param name name of the StorageVersion
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceStorageVersion(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceStorageVersion.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceStorageVersion.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1alpha1StorageVersion")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1StorageVersion");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace status of the specified StorageVersion
* @param name name of the StorageVersion
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceStorageVersionStatus(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceStorageVersionStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceStorageVersionStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1alpha1StorageVersion")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1StorageVersion");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.InternalApiserverV1alpha1Api = InternalApiserverV1alpha1Api;
//# sourceMappingURL=internalApiserverV1alpha1Api.js.map
/***/ }),
/***/ 88382:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.LogsApi = exports.LogsApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(4351);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
/* tslint:disable:no-unused-locals */
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var LogsApiApiKeys;
(function (LogsApiApiKeys) {
LogsApiApiKeys[LogsApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(LogsApiApiKeys = exports.LogsApiApiKeys || (exports.LogsApiApiKeys = {}));
class LogsApi {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[LogsApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
*
* @param logpath path to the log
*/
async logFileHandler(logpath, options = { headers: {} }) {
const localVarPath = this.basePath + '/logs/{logpath}'
.replace('{' + 'logpath' + '}', encodeURIComponent(String(logpath)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
let localVarFormParams = {};
// verify required parameter 'logpath' is not null or undefined
if (logpath === null || logpath === undefined) {
throw new Error('Required parameter logpath was null or undefined when calling logFileHandler.');
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
*
*/
async logFileListHandler(options = { headers: {} }) {
const localVarPath = this.basePath + '/logs/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.LogsApi = LogsApi;
//# sourceMappingURL=logsApi.js.map
/***/ }),
/***/ 48169:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.NetworkingApi = exports.NetworkingApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(4351);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var NetworkingApiApiKeys;
(function (NetworkingApiApiKeys) {
NetworkingApiApiKeys[NetworkingApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(NetworkingApiApiKeys = exports.NetworkingApiApiKeys || (exports.NetworkingApiApiKeys = {}));
class NetworkingApi {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[NetworkingApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* get information of a group
*/
async getAPIGroup(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/networking.k8s.io/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIGroup");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.NetworkingApi = NetworkingApi;
//# sourceMappingURL=networkingApi.js.map
/***/ }),
/***/ 97534:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.NetworkingV1Api = exports.NetworkingV1ApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(4351);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var NetworkingV1ApiApiKeys;
(function (NetworkingV1ApiApiKeys) {
NetworkingV1ApiApiKeys[NetworkingV1ApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(NetworkingV1ApiApiKeys = exports.NetworkingV1ApiApiKeys || (exports.NetworkingV1ApiApiKeys = {}));
class NetworkingV1Api {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[NetworkingV1ApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* create an IngressClass
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createIngressClass(body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/ingressclasses';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createIngressClass.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1IngressClass")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1IngressClass");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* create an Ingress
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createNamespacedIngress(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling createNamespacedIngress.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createNamespacedIngress.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1Ingress")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Ingress");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* create a NetworkPolicy
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createNamespacedNetworkPolicy(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling createNamespacedNetworkPolicy.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createNamespacedNetworkPolicy.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1NetworkPolicy")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1NetworkPolicy");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of IngressClass
* @param pretty If \'true\', then the output is pretty printed.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionIngressClass(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/ingressclasses';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of Ingress
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionNamespacedIngress(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedIngress.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of NetworkPolicy
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionNamespacedNetworkPolicy(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedNetworkPolicy.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete an IngressClass
* @param name name of the IngressClass
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param body
*/
async deleteIngressClass(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/ingressclasses/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteIngressClass.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete an Ingress
* @param name name of the Ingress
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param body
*/
async deleteNamespacedIngress(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteNamespacedIngress.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedIngress.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a NetworkPolicy
* @param name name of the NetworkPolicy
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param body
*/
async deleteNamespacedNetworkPolicy(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteNamespacedNetworkPolicy.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedNetworkPolicy.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* get available resources
*/
async getAPIResources(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind IngressClass
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listIngressClass(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/ingressclasses';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1IngressClassList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind Ingress
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param pretty If \'true\', then the output is pretty printed.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listIngressForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/ingresses';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1IngressList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind Ingress
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listNamespacedIngress(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling listNamespacedIngress.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1IngressList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind NetworkPolicy
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listNamespacedNetworkPolicy(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling listNamespacedNetworkPolicy.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1NetworkPolicyList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind NetworkPolicy
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param pretty If \'true\', then the output is pretty printed.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listNetworkPolicyForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/networkpolicies';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1NetworkPolicyList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified IngressClass
* @param name name of the IngressClass
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchIngressClass(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/ingressclasses/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchIngressClass.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchIngressClass.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1IngressClass");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified Ingress
* @param name name of the Ingress
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedIngress(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedIngress.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedIngress.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedIngress.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Ingress");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update status of the specified Ingress
* @param name name of the Ingress
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedIngressStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedIngressStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedIngressStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedIngressStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Ingress");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified NetworkPolicy
* @param name name of the NetworkPolicy
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedNetworkPolicy(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedNetworkPolicy.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedNetworkPolicy.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedNetworkPolicy.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1NetworkPolicy");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified IngressClass
* @param name name of the IngressClass
* @param pretty If \'true\', then the output is pretty printed.
*/
async readIngressClass(name, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/ingressclasses/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readIngressClass.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1IngressClass");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified Ingress
* @param name name of the Ingress
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedIngress(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedIngress.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedIngress.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Ingress");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read status of the specified Ingress
* @param name name of the Ingress
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedIngressStatus(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedIngressStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedIngressStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Ingress");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified NetworkPolicy
* @param name name of the NetworkPolicy
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedNetworkPolicy(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedNetworkPolicy.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedNetworkPolicy.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1NetworkPolicy");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified IngressClass
* @param name name of the IngressClass
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceIngressClass(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/ingressclasses/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceIngressClass.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceIngressClass.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1IngressClass")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1IngressClass");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified Ingress
* @param name name of the Ingress
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedIngress(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedIngress.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedIngress.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedIngress.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1Ingress")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Ingress");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace status of the specified Ingress
* @param name name of the Ingress
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedIngressStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedIngressStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedIngressStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedIngressStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1Ingress")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Ingress");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified NetworkPolicy
* @param name name of the NetworkPolicy
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedNetworkPolicy(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedNetworkPolicy.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedNetworkPolicy.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedNetworkPolicy.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1NetworkPolicy")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1NetworkPolicy");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.NetworkingV1Api = NetworkingV1Api;
//# sourceMappingURL=networkingV1Api.js.map
/***/ }),
/***/ 31466:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.NodeApi = exports.NodeApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(4351);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var NodeApiApiKeys;
(function (NodeApiApiKeys) {
NodeApiApiKeys[NodeApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(NodeApiApiKeys = exports.NodeApiApiKeys || (exports.NodeApiApiKeys = {}));
class NodeApi {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[NodeApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* get information of a group
*/
async getAPIGroup(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/node.k8s.io/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIGroup");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.NodeApi = NodeApi;
//# sourceMappingURL=nodeApi.js.map
/***/ }),
/***/ 9090:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.NodeV1Api = exports.NodeV1ApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(4351);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var NodeV1ApiApiKeys;
(function (NodeV1ApiApiKeys) {
NodeV1ApiApiKeys[NodeV1ApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(NodeV1ApiApiKeys = exports.NodeV1ApiApiKeys || (exports.NodeV1ApiApiKeys = {}));
class NodeV1Api {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[NodeV1ApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* create a RuntimeClass
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createRuntimeClass(body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/node.k8s.io/v1/runtimeclasses';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createRuntimeClass.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1RuntimeClass")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1RuntimeClass");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of RuntimeClass
* @param pretty If \'true\', then the output is pretty printed.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionRuntimeClass(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/node.k8s.io/v1/runtimeclasses';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a RuntimeClass
* @param name name of the RuntimeClass
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param body
*/
async deleteRuntimeClass(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/node.k8s.io/v1/runtimeclasses/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteRuntimeClass.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* get available resources
*/
async getAPIResources(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/node.k8s.io/v1/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind RuntimeClass
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listRuntimeClass(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/node.k8s.io/v1/runtimeclasses';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1RuntimeClassList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified RuntimeClass
* @param name name of the RuntimeClass
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchRuntimeClass(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/node.k8s.io/v1/runtimeclasses/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchRuntimeClass.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchRuntimeClass.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1RuntimeClass");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified RuntimeClass
* @param name name of the RuntimeClass
* @param pretty If \'true\', then the output is pretty printed.
*/
async readRuntimeClass(name, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/node.k8s.io/v1/runtimeclasses/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readRuntimeClass.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1RuntimeClass");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified RuntimeClass
* @param name name of the RuntimeClass
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceRuntimeClass(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/node.k8s.io/v1/runtimeclasses/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceRuntimeClass.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceRuntimeClass.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1RuntimeClass")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1RuntimeClass");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.NodeV1Api = NodeV1Api;
//# sourceMappingURL=nodeV1Api.js.map
/***/ }),
/***/ 17374:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.NodeV1alpha1Api = exports.NodeV1alpha1ApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(4351);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var NodeV1alpha1ApiApiKeys;
(function (NodeV1alpha1ApiApiKeys) {
NodeV1alpha1ApiApiKeys[NodeV1alpha1ApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(NodeV1alpha1ApiApiKeys = exports.NodeV1alpha1ApiApiKeys || (exports.NodeV1alpha1ApiApiKeys = {}));
class NodeV1alpha1Api {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[NodeV1alpha1ApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* create a RuntimeClass
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createRuntimeClass(body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/node.k8s.io/v1alpha1/runtimeclasses';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createRuntimeClass.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1alpha1RuntimeClass")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1RuntimeClass");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of RuntimeClass
* @param pretty If \'true\', then the output is pretty printed.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionRuntimeClass(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/node.k8s.io/v1alpha1/runtimeclasses';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a RuntimeClass
* @param name name of the RuntimeClass
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param body
*/
async deleteRuntimeClass(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/node.k8s.io/v1alpha1/runtimeclasses/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteRuntimeClass.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* get available resources
*/
async getAPIResources(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/node.k8s.io/v1alpha1/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind RuntimeClass
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listRuntimeClass(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/node.k8s.io/v1alpha1/runtimeclasses';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1RuntimeClassList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified RuntimeClass
* @param name name of the RuntimeClass
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchRuntimeClass(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/node.k8s.io/v1alpha1/runtimeclasses/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchRuntimeClass.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchRuntimeClass.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1RuntimeClass");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified RuntimeClass
* @param name name of the RuntimeClass
* @param pretty If \'true\', then the output is pretty printed.
*/
async readRuntimeClass(name, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/node.k8s.io/v1alpha1/runtimeclasses/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readRuntimeClass.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1RuntimeClass");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified RuntimeClass
* @param name name of the RuntimeClass
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceRuntimeClass(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/node.k8s.io/v1alpha1/runtimeclasses/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceRuntimeClass.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceRuntimeClass.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1alpha1RuntimeClass")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1RuntimeClass");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.NodeV1alpha1Api = NodeV1alpha1Api;
//# sourceMappingURL=nodeV1alpha1Api.js.map
/***/ }),
/***/ 78504:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.NodeV1beta1Api = exports.NodeV1beta1ApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(4351);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var NodeV1beta1ApiApiKeys;
(function (NodeV1beta1ApiApiKeys) {
NodeV1beta1ApiApiKeys[NodeV1beta1ApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(NodeV1beta1ApiApiKeys = exports.NodeV1beta1ApiApiKeys || (exports.NodeV1beta1ApiApiKeys = {}));
class NodeV1beta1Api {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[NodeV1beta1ApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* create a RuntimeClass
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createRuntimeClass(body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/node.k8s.io/v1beta1/runtimeclasses';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createRuntimeClass.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1beta1RuntimeClass")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1RuntimeClass");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of RuntimeClass
* @param pretty If \'true\', then the output is pretty printed.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionRuntimeClass(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/node.k8s.io/v1beta1/runtimeclasses';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a RuntimeClass
* @param name name of the RuntimeClass
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param body
*/
async deleteRuntimeClass(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/node.k8s.io/v1beta1/runtimeclasses/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteRuntimeClass.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* get available resources
*/
async getAPIResources(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/node.k8s.io/v1beta1/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind RuntimeClass
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listRuntimeClass(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/node.k8s.io/v1beta1/runtimeclasses';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1RuntimeClassList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified RuntimeClass
* @param name name of the RuntimeClass
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchRuntimeClass(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/node.k8s.io/v1beta1/runtimeclasses/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchRuntimeClass.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchRuntimeClass.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1RuntimeClass");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified RuntimeClass
* @param name name of the RuntimeClass
* @param pretty If \'true\', then the output is pretty printed.
*/
async readRuntimeClass(name, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/node.k8s.io/v1beta1/runtimeclasses/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readRuntimeClass.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1RuntimeClass");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified RuntimeClass
* @param name name of the RuntimeClass
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceRuntimeClass(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/node.k8s.io/v1beta1/runtimeclasses/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceRuntimeClass.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceRuntimeClass.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1beta1RuntimeClass")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1RuntimeClass");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.NodeV1beta1Api = NodeV1beta1Api;
//# sourceMappingURL=nodeV1beta1Api.js.map
/***/ }),
/***/ 5381:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.OpenidApi = exports.OpenidApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(4351);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
/* tslint:disable:no-unused-locals */
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var OpenidApiApiKeys;
(function (OpenidApiApiKeys) {
OpenidApiApiKeys[OpenidApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(OpenidApiApiKeys = exports.OpenidApiApiKeys || (exports.OpenidApiApiKeys = {}));
class OpenidApi {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[OpenidApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* get service account issuer OpenID JSON Web Key Set (contains public token verification keys)
*/
async getServiceAccountIssuerOpenIDKeyset(options = { headers: {} }) {
const localVarPath = this.basePath + '/openid/v1/jwks/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/jwk-set+json'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.OpenidApi = OpenidApi;
//# sourceMappingURL=openidApi.js.map
/***/ }),
/***/ 37284:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.PolicyApi = exports.PolicyApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(4351);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var PolicyApiApiKeys;
(function (PolicyApiApiKeys) {
PolicyApiApiKeys[PolicyApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(PolicyApiApiKeys = exports.PolicyApiApiKeys || (exports.PolicyApiApiKeys = {}));
class PolicyApi {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[PolicyApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* get information of a group
*/
async getAPIGroup(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/policy/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIGroup");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.PolicyApi = PolicyApi;
//# sourceMappingURL=policyApi.js.map
/***/ }),
/***/ 87307:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.PolicyV1Api = exports.PolicyV1ApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(4351);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var PolicyV1ApiApiKeys;
(function (PolicyV1ApiApiKeys) {
PolicyV1ApiApiKeys[PolicyV1ApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(PolicyV1ApiApiKeys = exports.PolicyV1ApiApiKeys || (exports.PolicyV1ApiApiKeys = {}));
class PolicyV1Api {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[PolicyV1ApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* create a PodDisruptionBudget
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createNamespacedPodDisruptionBudget(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling createNamespacedPodDisruptionBudget.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createNamespacedPodDisruptionBudget.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1PodDisruptionBudget")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1PodDisruptionBudget");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of PodDisruptionBudget
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionNamespacedPodDisruptionBudget(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedPodDisruptionBudget.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a PodDisruptionBudget
* @param name name of the PodDisruptionBudget
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param body
*/
async deleteNamespacedPodDisruptionBudget(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteNamespacedPodDisruptionBudget.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedPodDisruptionBudget.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* get available resources
*/
async getAPIResources(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/policy/v1/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind PodDisruptionBudget
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listNamespacedPodDisruptionBudget(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling listNamespacedPodDisruptionBudget.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1PodDisruptionBudgetList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind PodDisruptionBudget
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param pretty If \'true\', then the output is pretty printed.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listPodDisruptionBudgetForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/policy/v1/poddisruptionbudgets';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1PodDisruptionBudgetList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified PodDisruptionBudget
* @param name name of the PodDisruptionBudget
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedPodDisruptionBudget(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedPodDisruptionBudget.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedPodDisruptionBudget.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedPodDisruptionBudget.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1PodDisruptionBudget");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update status of the specified PodDisruptionBudget
* @param name name of the PodDisruptionBudget
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedPodDisruptionBudgetStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedPodDisruptionBudgetStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedPodDisruptionBudgetStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedPodDisruptionBudgetStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1PodDisruptionBudget");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified PodDisruptionBudget
* @param name name of the PodDisruptionBudget
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedPodDisruptionBudget(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedPodDisruptionBudget.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedPodDisruptionBudget.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1PodDisruptionBudget");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read status of the specified PodDisruptionBudget
* @param name name of the PodDisruptionBudget
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedPodDisruptionBudgetStatus(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedPodDisruptionBudgetStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedPodDisruptionBudgetStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1PodDisruptionBudget");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified PodDisruptionBudget
* @param name name of the PodDisruptionBudget
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedPodDisruptionBudget(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedPodDisruptionBudget.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedPodDisruptionBudget.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedPodDisruptionBudget.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1PodDisruptionBudget")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1PodDisruptionBudget");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace status of the specified PodDisruptionBudget
* @param name name of the PodDisruptionBudget
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedPodDisruptionBudgetStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedPodDisruptionBudgetStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedPodDisruptionBudgetStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedPodDisruptionBudgetStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1PodDisruptionBudget")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1PodDisruptionBudget");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.PolicyV1Api = PolicyV1Api;
//# sourceMappingURL=policyV1Api.js.map
/***/ }),
/***/ 80228:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.PolicyV1beta1Api = exports.PolicyV1beta1ApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(4351);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var PolicyV1beta1ApiApiKeys;
(function (PolicyV1beta1ApiApiKeys) {
PolicyV1beta1ApiApiKeys[PolicyV1beta1ApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(PolicyV1beta1ApiApiKeys = exports.PolicyV1beta1ApiApiKeys || (exports.PolicyV1beta1ApiApiKeys = {}));
class PolicyV1beta1Api {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[PolicyV1beta1ApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* create a PodDisruptionBudget
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createNamespacedPodDisruptionBudget(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/policy/v1beta1/namespaces/{namespace}/poddisruptionbudgets'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling createNamespacedPodDisruptionBudget.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createNamespacedPodDisruptionBudget.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1beta1PodDisruptionBudget")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1PodDisruptionBudget");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* create a PodSecurityPolicy
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createPodSecurityPolicy(body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/policy/v1beta1/podsecuritypolicies';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createPodSecurityPolicy.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1beta1PodSecurityPolicy")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1PodSecurityPolicy");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of PodDisruptionBudget
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionNamespacedPodDisruptionBudget(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/policy/v1beta1/namespaces/{namespace}/poddisruptionbudgets'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedPodDisruptionBudget.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of PodSecurityPolicy
* @param pretty If \'true\', then the output is pretty printed.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionPodSecurityPolicy(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/policy/v1beta1/podsecuritypolicies';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a PodDisruptionBudget
* @param name name of the PodDisruptionBudget
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param body
*/
async deleteNamespacedPodDisruptionBudget(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/policy/v1beta1/namespaces/{namespace}/poddisruptionbudgets/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteNamespacedPodDisruptionBudget.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedPodDisruptionBudget.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a PodSecurityPolicy
* @param name name of the PodSecurityPolicy
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param body
*/
async deletePodSecurityPolicy(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/policy/v1beta1/podsecuritypolicies/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deletePodSecurityPolicy.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1PodSecurityPolicy");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* get available resources
*/
async getAPIResources(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/policy/v1beta1/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind PodDisruptionBudget
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listNamespacedPodDisruptionBudget(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/policy/v1beta1/namespaces/{namespace}/poddisruptionbudgets'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling listNamespacedPodDisruptionBudget.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1PodDisruptionBudgetList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind PodDisruptionBudget
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param pretty If \'true\', then the output is pretty printed.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listPodDisruptionBudgetForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/policy/v1beta1/poddisruptionbudgets';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1PodDisruptionBudgetList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind PodSecurityPolicy
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listPodSecurityPolicy(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/policy/v1beta1/podsecuritypolicies';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1PodSecurityPolicyList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified PodDisruptionBudget
* @param name name of the PodDisruptionBudget
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedPodDisruptionBudget(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/policy/v1beta1/namespaces/{namespace}/poddisruptionbudgets/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedPodDisruptionBudget.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedPodDisruptionBudget.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedPodDisruptionBudget.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1PodDisruptionBudget");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update status of the specified PodDisruptionBudget
* @param name name of the PodDisruptionBudget
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedPodDisruptionBudgetStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/policy/v1beta1/namespaces/{namespace}/poddisruptionbudgets/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedPodDisruptionBudgetStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedPodDisruptionBudgetStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedPodDisruptionBudgetStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1PodDisruptionBudget");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified PodSecurityPolicy
* @param name name of the PodSecurityPolicy
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchPodSecurityPolicy(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/policy/v1beta1/podsecuritypolicies/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchPodSecurityPolicy.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchPodSecurityPolicy.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1PodSecurityPolicy");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified PodDisruptionBudget
* @param name name of the PodDisruptionBudget
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedPodDisruptionBudget(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/policy/v1beta1/namespaces/{namespace}/poddisruptionbudgets/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedPodDisruptionBudget.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedPodDisruptionBudget.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1PodDisruptionBudget");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read status of the specified PodDisruptionBudget
* @param name name of the PodDisruptionBudget
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedPodDisruptionBudgetStatus(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/policy/v1beta1/namespaces/{namespace}/poddisruptionbudgets/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedPodDisruptionBudgetStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedPodDisruptionBudgetStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1PodDisruptionBudget");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified PodSecurityPolicy
* @param name name of the PodSecurityPolicy
* @param pretty If \'true\', then the output is pretty printed.
*/
async readPodSecurityPolicy(name, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/policy/v1beta1/podsecuritypolicies/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readPodSecurityPolicy.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1PodSecurityPolicy");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified PodDisruptionBudget
* @param name name of the PodDisruptionBudget
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedPodDisruptionBudget(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/policy/v1beta1/namespaces/{namespace}/poddisruptionbudgets/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedPodDisruptionBudget.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedPodDisruptionBudget.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedPodDisruptionBudget.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1beta1PodDisruptionBudget")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1PodDisruptionBudget");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace status of the specified PodDisruptionBudget
* @param name name of the PodDisruptionBudget
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedPodDisruptionBudgetStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/policy/v1beta1/namespaces/{namespace}/poddisruptionbudgets/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedPodDisruptionBudgetStatus.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedPodDisruptionBudgetStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedPodDisruptionBudgetStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1beta1PodDisruptionBudget")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1PodDisruptionBudget");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified PodSecurityPolicy
* @param name name of the PodSecurityPolicy
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replacePodSecurityPolicy(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/policy/v1beta1/podsecuritypolicies/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replacePodSecurityPolicy.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replacePodSecurityPolicy.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1beta1PodSecurityPolicy")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1PodSecurityPolicy");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.PolicyV1beta1Api = PolicyV1beta1Api;
//# sourceMappingURL=policyV1beta1Api.js.map
/***/ }),
/***/ 73316:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.RbacAuthorizationApi = exports.RbacAuthorizationApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(4351);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var RbacAuthorizationApiApiKeys;
(function (RbacAuthorizationApiApiKeys) {
RbacAuthorizationApiApiKeys[RbacAuthorizationApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(RbacAuthorizationApiApiKeys = exports.RbacAuthorizationApiApiKeys || (exports.RbacAuthorizationApiApiKeys = {}));
class RbacAuthorizationApi {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[RbacAuthorizationApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* get information of a group
*/
async getAPIGroup(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIGroup");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.RbacAuthorizationApi = RbacAuthorizationApi;
//# sourceMappingURL=rbacAuthorizationApi.js.map
/***/ }),
/***/ 93149:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.RbacAuthorizationV1Api = exports.RbacAuthorizationV1ApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(4351);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var RbacAuthorizationV1ApiApiKeys;
(function (RbacAuthorizationV1ApiApiKeys) {
RbacAuthorizationV1ApiApiKeys[RbacAuthorizationV1ApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(RbacAuthorizationV1ApiApiKeys = exports.RbacAuthorizationV1ApiApiKeys || (exports.RbacAuthorizationV1ApiApiKeys = {}));
class RbacAuthorizationV1Api {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[RbacAuthorizationV1ApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* create a ClusterRole
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createClusterRole(body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/clusterroles';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createClusterRole.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1ClusterRole")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ClusterRole");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* create a ClusterRoleBinding
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createClusterRoleBinding(body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/clusterrolebindings';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createClusterRoleBinding.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1ClusterRoleBinding")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ClusterRoleBinding");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* create a Role
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createNamespacedRole(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling createNamespacedRole.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createNamespacedRole.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1Role")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Role");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* create a RoleBinding
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createNamespacedRoleBinding(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling createNamespacedRoleBinding.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createNamespacedRoleBinding.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1RoleBinding")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1RoleBinding");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a ClusterRole
* @param name name of the ClusterRole
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param body
*/
async deleteClusterRole(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/clusterroles/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteClusterRole.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a ClusterRoleBinding
* @param name name of the ClusterRoleBinding
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param body
*/
async deleteClusterRoleBinding(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/clusterrolebindings/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteClusterRoleBinding.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of ClusterRole
* @param pretty If \'true\', then the output is pretty printed.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionClusterRole(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/clusterroles';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of ClusterRoleBinding
* @param pretty If \'true\', then the output is pretty printed.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionClusterRoleBinding(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/clusterrolebindings';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of Role
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionNamespacedRole(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedRole.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of RoleBinding
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionNamespacedRoleBinding(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedRoleBinding.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a Role
* @param name name of the Role
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param body
*/
async deleteNamespacedRole(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteNamespacedRole.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedRole.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a RoleBinding
* @param name name of the RoleBinding
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param body
*/
async deleteNamespacedRoleBinding(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteNamespacedRoleBinding.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedRoleBinding.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* get available resources
*/
async getAPIResources(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind ClusterRole
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listClusterRole(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/clusterroles';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ClusterRoleList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind ClusterRoleBinding
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listClusterRoleBinding(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/clusterrolebindings';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ClusterRoleBindingList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind Role
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listNamespacedRole(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling listNamespacedRole.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1RoleList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind RoleBinding
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listNamespacedRoleBinding(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling listNamespacedRoleBinding.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1RoleBindingList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind RoleBinding
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param pretty If \'true\', then the output is pretty printed.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listRoleBindingForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/rolebindings';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1RoleBindingList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind Role
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param pretty If \'true\', then the output is pretty printed.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listRoleForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/roles';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1RoleList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified ClusterRole
* @param name name of the ClusterRole
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchClusterRole(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/clusterroles/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchClusterRole.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchClusterRole.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ClusterRole");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified ClusterRoleBinding
* @param name name of the ClusterRoleBinding
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchClusterRoleBinding(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/clusterrolebindings/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchClusterRoleBinding.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchClusterRoleBinding.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ClusterRoleBinding");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified Role
* @param name name of the Role
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedRole(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedRole.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedRole.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedRole.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Role");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified RoleBinding
* @param name name of the RoleBinding
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedRoleBinding(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedRoleBinding.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedRoleBinding.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedRoleBinding.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1RoleBinding");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified ClusterRole
* @param name name of the ClusterRole
* @param pretty If \'true\', then the output is pretty printed.
*/
async readClusterRole(name, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/clusterroles/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readClusterRole.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ClusterRole");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified ClusterRoleBinding
* @param name name of the ClusterRoleBinding
* @param pretty If \'true\', then the output is pretty printed.
*/
async readClusterRoleBinding(name, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/clusterrolebindings/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readClusterRoleBinding.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ClusterRoleBinding");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified Role
* @param name name of the Role
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedRole(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedRole.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedRole.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Role");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified RoleBinding
* @param name name of the RoleBinding
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedRoleBinding(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedRoleBinding.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedRoleBinding.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1RoleBinding");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified ClusterRole
* @param name name of the ClusterRole
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceClusterRole(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/clusterroles/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceClusterRole.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceClusterRole.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1ClusterRole")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ClusterRole");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified ClusterRoleBinding
* @param name name of the ClusterRoleBinding
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceClusterRoleBinding(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/clusterrolebindings/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceClusterRoleBinding.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceClusterRoleBinding.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1ClusterRoleBinding")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1ClusterRoleBinding");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified Role
* @param name name of the Role
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedRole(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedRole.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedRole.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedRole.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1Role")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Role");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified RoleBinding
* @param name name of the RoleBinding
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedRoleBinding(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedRoleBinding.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedRoleBinding.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedRoleBinding.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1RoleBinding")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1RoleBinding");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.RbacAuthorizationV1Api = RbacAuthorizationV1Api;
//# sourceMappingURL=rbacAuthorizationV1Api.js.map
/***/ }),
/***/ 44056:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.RbacAuthorizationV1alpha1Api = exports.RbacAuthorizationV1alpha1ApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(4351);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var RbacAuthorizationV1alpha1ApiApiKeys;
(function (RbacAuthorizationV1alpha1ApiApiKeys) {
RbacAuthorizationV1alpha1ApiApiKeys[RbacAuthorizationV1alpha1ApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(RbacAuthorizationV1alpha1ApiApiKeys = exports.RbacAuthorizationV1alpha1ApiApiKeys || (exports.RbacAuthorizationV1alpha1ApiApiKeys = {}));
class RbacAuthorizationV1alpha1Api {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[RbacAuthorizationV1alpha1ApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* create a ClusterRole
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createClusterRole(body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/clusterroles';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createClusterRole.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1alpha1ClusterRole")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1ClusterRole");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* create a ClusterRoleBinding
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createClusterRoleBinding(body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/clusterrolebindings';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createClusterRoleBinding.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1alpha1ClusterRoleBinding")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1ClusterRoleBinding");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* create a Role
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createNamespacedRole(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/roles'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling createNamespacedRole.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createNamespacedRole.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1alpha1Role")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1Role");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* create a RoleBinding
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createNamespacedRoleBinding(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/rolebindings'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling createNamespacedRoleBinding.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createNamespacedRoleBinding.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1alpha1RoleBinding")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1RoleBinding");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a ClusterRole
* @param name name of the ClusterRole
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param body
*/
async deleteClusterRole(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/clusterroles/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteClusterRole.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a ClusterRoleBinding
* @param name name of the ClusterRoleBinding
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param body
*/
async deleteClusterRoleBinding(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/clusterrolebindings/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteClusterRoleBinding.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of ClusterRole
* @param pretty If \'true\', then the output is pretty printed.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionClusterRole(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/clusterroles';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of ClusterRoleBinding
* @param pretty If \'true\', then the output is pretty printed.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionClusterRoleBinding(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/clusterrolebindings';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of Role
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionNamespacedRole(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/roles'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedRole.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of RoleBinding
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionNamespacedRoleBinding(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/rolebindings'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedRoleBinding.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a Role
* @param name name of the Role
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param body
*/
async deleteNamespacedRole(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/roles/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteNamespacedRole.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedRole.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a RoleBinding
* @param name name of the RoleBinding
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param body
*/
async deleteNamespacedRoleBinding(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/rolebindings/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteNamespacedRoleBinding.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedRoleBinding.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* get available resources
*/
async getAPIResources(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind ClusterRole
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listClusterRole(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/clusterroles';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1ClusterRoleList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind ClusterRoleBinding
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listClusterRoleBinding(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/clusterrolebindings';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1ClusterRoleBindingList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind Role
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listNamespacedRole(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/roles'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling listNamespacedRole.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1RoleList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind RoleBinding
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listNamespacedRoleBinding(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/rolebindings'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling listNamespacedRoleBinding.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1RoleBindingList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind RoleBinding
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param pretty If \'true\', then the output is pretty printed.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listRoleBindingForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/rolebindings';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1RoleBindingList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind Role
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param pretty If \'true\', then the output is pretty printed.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listRoleForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/roles';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1RoleList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified ClusterRole
* @param name name of the ClusterRole
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchClusterRole(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/clusterroles/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchClusterRole.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchClusterRole.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1ClusterRole");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified ClusterRoleBinding
* @param name name of the ClusterRoleBinding
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchClusterRoleBinding(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/clusterrolebindings/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchClusterRoleBinding.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchClusterRoleBinding.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1ClusterRoleBinding");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified Role
* @param name name of the Role
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedRole(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/roles/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedRole.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedRole.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedRole.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1Role");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified RoleBinding
* @param name name of the RoleBinding
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedRoleBinding(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/rolebindings/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedRoleBinding.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedRoleBinding.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedRoleBinding.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1RoleBinding");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified ClusterRole
* @param name name of the ClusterRole
* @param pretty If \'true\', then the output is pretty printed.
*/
async readClusterRole(name, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/clusterroles/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readClusterRole.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1ClusterRole");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified ClusterRoleBinding
* @param name name of the ClusterRoleBinding
* @param pretty If \'true\', then the output is pretty printed.
*/
async readClusterRoleBinding(name, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/clusterrolebindings/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readClusterRoleBinding.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1ClusterRoleBinding");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified Role
* @param name name of the Role
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedRole(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/roles/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedRole.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedRole.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1Role");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified RoleBinding
* @param name name of the RoleBinding
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedRoleBinding(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/rolebindings/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedRoleBinding.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedRoleBinding.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1RoleBinding");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified ClusterRole
* @param name name of the ClusterRole
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceClusterRole(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/clusterroles/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceClusterRole.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceClusterRole.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1alpha1ClusterRole")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1ClusterRole");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified ClusterRoleBinding
* @param name name of the ClusterRoleBinding
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceClusterRoleBinding(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/clusterrolebindings/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceClusterRoleBinding.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceClusterRoleBinding.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1alpha1ClusterRoleBinding")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1ClusterRoleBinding");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified Role
* @param name name of the Role
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedRole(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/roles/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedRole.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedRole.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedRole.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1alpha1Role")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1Role");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified RoleBinding
* @param name name of the RoleBinding
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedRoleBinding(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/rolebindings/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedRoleBinding.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedRoleBinding.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedRoleBinding.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1alpha1RoleBinding")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1RoleBinding");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.RbacAuthorizationV1alpha1Api = RbacAuthorizationV1alpha1Api;
//# sourceMappingURL=rbacAuthorizationV1alpha1Api.js.map
/***/ }),
/***/ 29389:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.SchedulingApi = exports.SchedulingApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(4351);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var SchedulingApiApiKeys;
(function (SchedulingApiApiKeys) {
SchedulingApiApiKeys[SchedulingApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(SchedulingApiApiKeys = exports.SchedulingApiApiKeys || (exports.SchedulingApiApiKeys = {}));
class SchedulingApi {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[SchedulingApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* get information of a group
*/
async getAPIGroup(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/scheduling.k8s.io/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIGroup");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.SchedulingApi = SchedulingApi;
//# sourceMappingURL=schedulingApi.js.map
/***/ }),
/***/ 26757:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.SchedulingV1Api = exports.SchedulingV1ApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(4351);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var SchedulingV1ApiApiKeys;
(function (SchedulingV1ApiApiKeys) {
SchedulingV1ApiApiKeys[SchedulingV1ApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(SchedulingV1ApiApiKeys = exports.SchedulingV1ApiApiKeys || (exports.SchedulingV1ApiApiKeys = {}));
class SchedulingV1Api {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[SchedulingV1ApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* create a PriorityClass
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createPriorityClass(body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1/priorityclasses';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createPriorityClass.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1PriorityClass")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1PriorityClass");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of PriorityClass
* @param pretty If \'true\', then the output is pretty printed.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionPriorityClass(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1/priorityclasses';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a PriorityClass
* @param name name of the PriorityClass
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param body
*/
async deletePriorityClass(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1/priorityclasses/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deletePriorityClass.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* get available resources
*/
async getAPIResources(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind PriorityClass
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listPriorityClass(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1/priorityclasses';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1PriorityClassList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified PriorityClass
* @param name name of the PriorityClass
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchPriorityClass(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1/priorityclasses/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchPriorityClass.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchPriorityClass.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1PriorityClass");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified PriorityClass
* @param name name of the PriorityClass
* @param pretty If \'true\', then the output is pretty printed.
*/
async readPriorityClass(name, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1/priorityclasses/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readPriorityClass.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1PriorityClass");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified PriorityClass
* @param name name of the PriorityClass
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replacePriorityClass(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1/priorityclasses/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replacePriorityClass.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replacePriorityClass.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1PriorityClass")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1PriorityClass");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.SchedulingV1Api = SchedulingV1Api;
//# sourceMappingURL=schedulingV1Api.js.map
/***/ }),
/***/ 91655:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.SchedulingV1alpha1Api = exports.SchedulingV1alpha1ApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(4351);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var SchedulingV1alpha1ApiApiKeys;
(function (SchedulingV1alpha1ApiApiKeys) {
SchedulingV1alpha1ApiApiKeys[SchedulingV1alpha1ApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(SchedulingV1alpha1ApiApiKeys = exports.SchedulingV1alpha1ApiApiKeys || (exports.SchedulingV1alpha1ApiApiKeys = {}));
class SchedulingV1alpha1Api {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[SchedulingV1alpha1ApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* create a PriorityClass
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createPriorityClass(body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1alpha1/priorityclasses';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createPriorityClass.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1alpha1PriorityClass")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1PriorityClass");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of PriorityClass
* @param pretty If \'true\', then the output is pretty printed.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionPriorityClass(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1alpha1/priorityclasses';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a PriorityClass
* @param name name of the PriorityClass
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param body
*/
async deletePriorityClass(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1alpha1/priorityclasses/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deletePriorityClass.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* get available resources
*/
async getAPIResources(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1alpha1/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind PriorityClass
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listPriorityClass(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1alpha1/priorityclasses';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1PriorityClassList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified PriorityClass
* @param name name of the PriorityClass
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchPriorityClass(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1alpha1/priorityclasses/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchPriorityClass.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchPriorityClass.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1PriorityClass");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified PriorityClass
* @param name name of the PriorityClass
* @param pretty If \'true\', then the output is pretty printed.
*/
async readPriorityClass(name, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1alpha1/priorityclasses/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readPriorityClass.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1PriorityClass");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified PriorityClass
* @param name name of the PriorityClass
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replacePriorityClass(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1alpha1/priorityclasses/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replacePriorityClass.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replacePriorityClass.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1alpha1PriorityClass")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1PriorityClass");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.SchedulingV1alpha1Api = SchedulingV1alpha1Api;
//# sourceMappingURL=schedulingV1alpha1Api.js.map
/***/ }),
/***/ 91143:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.StorageApi = exports.StorageApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(4351);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var StorageApiApiKeys;
(function (StorageApiApiKeys) {
StorageApiApiKeys[StorageApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(StorageApiApiKeys = exports.StorageApiApiKeys || (exports.StorageApiApiKeys = {}));
class StorageApi {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[StorageApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* get information of a group
*/
async getAPIGroup(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIGroup");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.StorageApi = StorageApi;
//# sourceMappingURL=storageApi.js.map
/***/ }),
/***/ 922:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.StorageV1Api = exports.StorageV1ApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(4351);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var StorageV1ApiApiKeys;
(function (StorageV1ApiApiKeys) {
StorageV1ApiApiKeys[StorageV1ApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(StorageV1ApiApiKeys = exports.StorageV1ApiApiKeys || (exports.StorageV1ApiApiKeys = {}));
class StorageV1Api {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[StorageV1ApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* create a CSIDriver
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createCSIDriver(body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/csidrivers';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createCSIDriver.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1CSIDriver")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1CSIDriver");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* create a CSINode
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createCSINode(body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/csinodes';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createCSINode.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1CSINode")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1CSINode");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* create a StorageClass
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createStorageClass(body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/storageclasses';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createStorageClass.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1StorageClass")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1StorageClass");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* create a VolumeAttachment
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createVolumeAttachment(body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/volumeattachments';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createVolumeAttachment.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1VolumeAttachment")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1VolumeAttachment");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a CSIDriver
* @param name name of the CSIDriver
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param body
*/
async deleteCSIDriver(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/csidrivers/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteCSIDriver.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1CSIDriver");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a CSINode
* @param name name of the CSINode
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param body
*/
async deleteCSINode(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/csinodes/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteCSINode.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1CSINode");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of CSIDriver
* @param pretty If \'true\', then the output is pretty printed.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionCSIDriver(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/csidrivers';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of CSINode
* @param pretty If \'true\', then the output is pretty printed.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionCSINode(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/csinodes';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of StorageClass
* @param pretty If \'true\', then the output is pretty printed.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionStorageClass(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/storageclasses';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of VolumeAttachment
* @param pretty If \'true\', then the output is pretty printed.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionVolumeAttachment(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/volumeattachments';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a StorageClass
* @param name name of the StorageClass
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param body
*/
async deleteStorageClass(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/storageclasses/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteStorageClass.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1StorageClass");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a VolumeAttachment
* @param name name of the VolumeAttachment
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param body
*/
async deleteVolumeAttachment(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/volumeattachments/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteVolumeAttachment.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1VolumeAttachment");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* get available resources
*/
async getAPIResources(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind CSIDriver
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listCSIDriver(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/csidrivers';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1CSIDriverList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind CSINode
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listCSINode(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/csinodes';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1CSINodeList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind StorageClass
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listStorageClass(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/storageclasses';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1StorageClassList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind VolumeAttachment
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listVolumeAttachment(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/volumeattachments';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1VolumeAttachmentList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified CSIDriver
* @param name name of the CSIDriver
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchCSIDriver(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/csidrivers/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchCSIDriver.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchCSIDriver.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1CSIDriver");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified CSINode
* @param name name of the CSINode
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchCSINode(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/csinodes/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchCSINode.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchCSINode.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1CSINode");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified StorageClass
* @param name name of the StorageClass
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchStorageClass(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/storageclasses/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchStorageClass.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchStorageClass.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1StorageClass");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified VolumeAttachment
* @param name name of the VolumeAttachment
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchVolumeAttachment(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/volumeattachments/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchVolumeAttachment.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchVolumeAttachment.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1VolumeAttachment");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update status of the specified VolumeAttachment
* @param name name of the VolumeAttachment
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchVolumeAttachmentStatus(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/volumeattachments/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchVolumeAttachmentStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchVolumeAttachmentStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1VolumeAttachment");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified CSIDriver
* @param name name of the CSIDriver
* @param pretty If \'true\', then the output is pretty printed.
*/
async readCSIDriver(name, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/csidrivers/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readCSIDriver.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1CSIDriver");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified CSINode
* @param name name of the CSINode
* @param pretty If \'true\', then the output is pretty printed.
*/
async readCSINode(name, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/csinodes/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readCSINode.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1CSINode");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified StorageClass
* @param name name of the StorageClass
* @param pretty If \'true\', then the output is pretty printed.
*/
async readStorageClass(name, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/storageclasses/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readStorageClass.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1StorageClass");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified VolumeAttachment
* @param name name of the VolumeAttachment
* @param pretty If \'true\', then the output is pretty printed.
*/
async readVolumeAttachment(name, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/volumeattachments/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readVolumeAttachment.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1VolumeAttachment");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read status of the specified VolumeAttachment
* @param name name of the VolumeAttachment
* @param pretty If \'true\', then the output is pretty printed.
*/
async readVolumeAttachmentStatus(name, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/volumeattachments/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readVolumeAttachmentStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1VolumeAttachment");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified CSIDriver
* @param name name of the CSIDriver
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceCSIDriver(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/csidrivers/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceCSIDriver.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceCSIDriver.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1CSIDriver")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1CSIDriver");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified CSINode
* @param name name of the CSINode
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceCSINode(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/csinodes/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceCSINode.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceCSINode.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1CSINode")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1CSINode");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified StorageClass
* @param name name of the StorageClass
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceStorageClass(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/storageclasses/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceStorageClass.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceStorageClass.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1StorageClass")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1StorageClass");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified VolumeAttachment
* @param name name of the VolumeAttachment
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceVolumeAttachment(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/volumeattachments/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceVolumeAttachment.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceVolumeAttachment.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1VolumeAttachment")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1VolumeAttachment");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace status of the specified VolumeAttachment
* @param name name of the VolumeAttachment
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceVolumeAttachmentStatus(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/volumeattachments/{name}/status'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceVolumeAttachmentStatus.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceVolumeAttachmentStatus.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1VolumeAttachment")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1VolumeAttachment");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.StorageV1Api = StorageV1Api;
//# sourceMappingURL=storageV1Api.js.map
/***/ }),
/***/ 30769:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.StorageV1alpha1Api = exports.StorageV1alpha1ApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(4351);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var StorageV1alpha1ApiApiKeys;
(function (StorageV1alpha1ApiApiKeys) {
StorageV1alpha1ApiApiKeys[StorageV1alpha1ApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(StorageV1alpha1ApiApiKeys = exports.StorageV1alpha1ApiApiKeys || (exports.StorageV1alpha1ApiApiKeys = {}));
class StorageV1alpha1Api {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[StorageV1alpha1ApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* create a CSIStorageCapacity
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createNamespacedCSIStorageCapacity(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/namespaces/{namespace}/csistoragecapacities'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling createNamespacedCSIStorageCapacity.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createNamespacedCSIStorageCapacity.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1alpha1CSIStorageCapacity")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1CSIStorageCapacity");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* create a VolumeAttachment
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createVolumeAttachment(body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/volumeattachments';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createVolumeAttachment.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1alpha1VolumeAttachment")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1VolumeAttachment");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of CSIStorageCapacity
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionNamespacedCSIStorageCapacity(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/namespaces/{namespace}/csistoragecapacities'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedCSIStorageCapacity.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of VolumeAttachment
* @param pretty If \'true\', then the output is pretty printed.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionVolumeAttachment(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/volumeattachments';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a CSIStorageCapacity
* @param name name of the CSIStorageCapacity
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param body
*/
async deleteNamespacedCSIStorageCapacity(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/namespaces/{namespace}/csistoragecapacities/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteNamespacedCSIStorageCapacity.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedCSIStorageCapacity.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a VolumeAttachment
* @param name name of the VolumeAttachment
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param body
*/
async deleteVolumeAttachment(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/volumeattachments/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteVolumeAttachment.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1VolumeAttachment");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* get available resources
*/
async getAPIResources(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind CSIStorageCapacity
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param pretty If \'true\', then the output is pretty printed.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listCSIStorageCapacityForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/csistoragecapacities';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1CSIStorageCapacityList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind CSIStorageCapacity
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listNamespacedCSIStorageCapacity(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/namespaces/{namespace}/csistoragecapacities'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling listNamespacedCSIStorageCapacity.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1CSIStorageCapacityList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind VolumeAttachment
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listVolumeAttachment(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/volumeattachments';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1VolumeAttachmentList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified CSIStorageCapacity
* @param name name of the CSIStorageCapacity
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedCSIStorageCapacity(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/namespaces/{namespace}/csistoragecapacities/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedCSIStorageCapacity.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedCSIStorageCapacity.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedCSIStorageCapacity.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1CSIStorageCapacity");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified VolumeAttachment
* @param name name of the VolumeAttachment
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchVolumeAttachment(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/volumeattachments/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchVolumeAttachment.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchVolumeAttachment.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1VolumeAttachment");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified CSIStorageCapacity
* @param name name of the CSIStorageCapacity
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedCSIStorageCapacity(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/namespaces/{namespace}/csistoragecapacities/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedCSIStorageCapacity.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedCSIStorageCapacity.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1CSIStorageCapacity");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified VolumeAttachment
* @param name name of the VolumeAttachment
* @param pretty If \'true\', then the output is pretty printed.
*/
async readVolumeAttachment(name, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/volumeattachments/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readVolumeAttachment.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1VolumeAttachment");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified CSIStorageCapacity
* @param name name of the CSIStorageCapacity
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedCSIStorageCapacity(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/namespaces/{namespace}/csistoragecapacities/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedCSIStorageCapacity.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedCSIStorageCapacity.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedCSIStorageCapacity.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1alpha1CSIStorageCapacity")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1CSIStorageCapacity");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified VolumeAttachment
* @param name name of the VolumeAttachment
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceVolumeAttachment(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/volumeattachments/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceVolumeAttachment.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceVolumeAttachment.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1alpha1VolumeAttachment")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1alpha1VolumeAttachment");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.StorageV1alpha1Api = StorageV1alpha1Api;
//# sourceMappingURL=storageV1alpha1Api.js.map
/***/ }),
/***/ 73491:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.StorageV1beta1Api = exports.StorageV1beta1ApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(4351);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var StorageV1beta1ApiApiKeys;
(function (StorageV1beta1ApiApiKeys) {
StorageV1beta1ApiApiKeys[StorageV1beta1ApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(StorageV1beta1ApiApiKeys = exports.StorageV1beta1ApiApiKeys || (exports.StorageV1beta1ApiApiKeys = {}));
class StorageV1beta1Api {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[StorageV1beta1ApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* create a CSIStorageCapacity
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async createNamespacedCSIStorageCapacity(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/namespaces/{namespace}/csistoragecapacities'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling createNamespacedCSIStorageCapacity.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createNamespacedCSIStorageCapacity.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1beta1CSIStorageCapacity")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1CSIStorageCapacity");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete collection of CSIStorageCapacity
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param body
*/
async deleteCollectionNamespacedCSIStorageCapacity(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/namespaces/{namespace}/csistoragecapacities'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedCSIStorageCapacity.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* delete a CSIStorageCapacity
* @param name name of the CSIStorageCapacity
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
* @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.
* @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.
* @param body
*/
async deleteNamespacedCSIStorageCapacity(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/namespaces/{namespace}/csistoragecapacities/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling deleteNamespacedCSIStorageCapacity.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedCSIStorageCapacity.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (gracePeriodSeconds !== undefined) {
localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number");
}
if (orphanDependents !== undefined) {
localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean");
}
if (propagationPolicy !== undefined) {
localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1Status");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* get available resources
*/
async getAPIResources(options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind CSIStorageCapacity
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param pretty If \'true\', then the output is pretty printed.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listCSIStorageCapacityForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/csistoragecapacities';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1CSIStorageCapacityList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* list or watch objects of kind CSIStorageCapacity
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
* @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
* @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
* @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.
* @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.
* @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
* @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
* @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
* @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
*/
async listNamespacedCSIStorageCapacity(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/namespaces/{namespace}/csistoragecapacities'
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling listNamespacedCSIStorageCapacity.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (allowWatchBookmarks !== undefined) {
localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean");
}
if (_continue !== undefined) {
localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string");
}
if (fieldSelector !== undefined) {
localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string");
}
if (labelSelector !== undefined) {
localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
}
if (resourceVersion !== undefined) {
localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string");
}
if (resourceVersionMatch !== undefined) {
localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string");
}
if (timeoutSeconds !== undefined) {
localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number");
}
if (watch !== undefined) {
localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1CSIStorageCapacityList");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* partially update the specified CSIStorageCapacity
* @param name name of the CSIStorageCapacity
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
* @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
*/
async patchNamespacedCSIStorageCapacity(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/namespaces/{namespace}/csistoragecapacities/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling patchNamespacedCSIStorageCapacity.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedCSIStorageCapacity.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling patchNamespacedCSIStorageCapacity.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
if (force !== undefined) {
localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PATCH',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "object")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1CSIStorageCapacity");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* read the specified CSIStorageCapacity
* @param name name of the CSIStorageCapacity
* @param namespace object name and auth scope, such as for teams and projects
* @param pretty If \'true\', then the output is pretty printed.
*/
async readNamespacedCSIStorageCapacity(name, namespace, pretty, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/namespaces/{namespace}/csistoragecapacities/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling readNamespacedCSIStorageCapacity.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling readNamespacedCSIStorageCapacity.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1CSIStorageCapacity");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* replace the specified CSIStorageCapacity
* @param name name of the CSIStorageCapacity
* @param namespace object name and auth scope, such as for teams and projects
* @param body
* @param pretty If \'true\', then the output is pretty printed.
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
* @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
*/
async replaceNamespacedCSIStorageCapacity(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {
const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/namespaces/{namespace}/csistoragecapacities/{name}'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)))
.replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling replaceNamespacedCSIStorageCapacity.');
}
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedCSIStorageCapacity.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling replaceNamespacedCSIStorageCapacity.');
}
if (pretty !== undefined) {
localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
}
if (dryRun !== undefined) {
localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
}
if (fieldManager !== undefined) {
localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string");
}
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: models_1.ObjectSerializer.serialize(body, "V1beta1CSIStorageCapacity")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "V1beta1CSIStorageCapacity");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.StorageV1beta1Api = StorageV1beta1Api;
//# sourceMappingURL=storageV1beta1Api.js.map
/***/ }),
/***/ 4441:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.VersionApi = exports.VersionApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(4351);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var VersionApiApiKeys;
(function (VersionApiApiKeys) {
VersionApiApiKeys[VersionApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(VersionApiApiKeys = exports.VersionApiApiKeys || (exports.VersionApiApiKeys = {}));
class VersionApi {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[VersionApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* get the code version
*/
async getCode(options = { headers: {} }) {
const localVarPath = this.basePath + '/version/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "VersionInfo");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.VersionApi = VersionApi;
//# sourceMappingURL=versionApi.js.map
/***/ }),
/***/ 19868:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.WellKnownApi = exports.WellKnownApiApiKeys = void 0;
const tslib_1 = __nccwpck_require__(4351);
const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699));
/* tslint:disable:no-unused-locals */
const models_1 = __nccwpck_require__(15158);
const models_2 = __nccwpck_require__(15158);
const apis_1 = __nccwpck_require__(25997);
let defaultBasePath = 'http://localhost';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
var WellKnownApiApiKeys;
(function (WellKnownApiApiKeys) {
WellKnownApiApiKeys[WellKnownApiApiKeys["BearerToken"] = 0] = "BearerToken";
})(WellKnownApiApiKeys = exports.WellKnownApiApiKeys || (exports.WellKnownApiApiKeys = {}));
class WellKnownApi {
constructor(basePathOrUsername, password, basePath) {
this._basePath = defaultBasePath;
this._defaultHeaders = {};
this._useQuerystring = false;
this.authentications = {
'default': new models_1.VoidAuth(),
'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),
};
this.interceptors = [];
if (password) {
if (basePath) {
this.basePath = basePath;
}
}
else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername;
}
}
}
set useQuerystring(value) {
this._useQuerystring = value;
}
set basePath(basePath) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
setDefaultAuthentication(auth) {
this.authentications.default = auth;
}
setApiKey(key, value) {
this.authentications[WellKnownApiApiKeys[key]].apiKey = value;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);
}
/**
* get service account issuer OpenID configuration, also known as the \'OIDC discovery doc\'
*/
async getServiceAccountIssuerOpenIDConfiguration(options = { headers: {} }) {
const localVarPath = this.basePath + '/.well-known/openid-configuration/';
let localVarQueryParameters = {};
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
const produces = ['application/json'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
}
else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams = {};
Object.assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
localVarRequestOptions.formData = localVarFormParams;
}
else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise((resolve, reject) => {
request_1.default(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
}
else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = models_1.ObjectSerializer.deserialize(body, "string");
resolve({ response: response, body: body });
}
else {
reject(new apis_1.HttpError(response, body, response.statusCode));
}
}
});
});
});
}
}
exports.WellKnownApi = WellKnownApi;
//# sourceMappingURL=wellKnownApi.js.map
/***/ }),
/***/ 21616:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.AdmissionregistrationV1ServiceReference = void 0;
/**
* ServiceReference holds a reference to Service.legacy.k8s.io
*/
class AdmissionregistrationV1ServiceReference {
static getAttributeTypeMap() {
return AdmissionregistrationV1ServiceReference.attributeTypeMap;
}
}
exports.AdmissionregistrationV1ServiceReference = AdmissionregistrationV1ServiceReference;
AdmissionregistrationV1ServiceReference.discriminator = undefined;
AdmissionregistrationV1ServiceReference.attributeTypeMap = [
{
"name": "name",
"baseName": "name",
"type": "string"
},
{
"name": "namespace",
"baseName": "namespace",
"type": "string"
},
{
"name": "path",
"baseName": "path",
"type": "string"
},
{
"name": "port",
"baseName": "port",
"type": "number"
}
];
//# sourceMappingURL=admissionregistrationV1ServiceReference.js.map
/***/ }),
/***/ 7818:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.AdmissionregistrationV1WebhookClientConfig = void 0;
/**
* WebhookClientConfig contains the information to make a TLS connection with the webhook
*/
class AdmissionregistrationV1WebhookClientConfig {
static getAttributeTypeMap() {
return AdmissionregistrationV1WebhookClientConfig.attributeTypeMap;
}
}
exports.AdmissionregistrationV1WebhookClientConfig = AdmissionregistrationV1WebhookClientConfig;
AdmissionregistrationV1WebhookClientConfig.discriminator = undefined;
AdmissionregistrationV1WebhookClientConfig.attributeTypeMap = [
{
"name": "caBundle",
"baseName": "caBundle",
"type": "string"
},
{
"name": "service",
"baseName": "service",
"type": "AdmissionregistrationV1ServiceReference"
},
{
"name": "url",
"baseName": "url",
"type": "string"
}
];
//# sourceMappingURL=admissionregistrationV1WebhookClientConfig.js.map
/***/ }),
/***/ 63536:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.ApiextensionsV1ServiceReference = void 0;
/**
* ServiceReference holds a reference to Service.legacy.k8s.io
*/
class ApiextensionsV1ServiceReference {
static getAttributeTypeMap() {
return ApiextensionsV1ServiceReference.attributeTypeMap;
}
}
exports.ApiextensionsV1ServiceReference = ApiextensionsV1ServiceReference;
ApiextensionsV1ServiceReference.discriminator = undefined;
ApiextensionsV1ServiceReference.attributeTypeMap = [
{
"name": "name",
"baseName": "name",
"type": "string"
},
{
"name": "namespace",
"baseName": "namespace",
"type": "string"
},
{
"name": "path",
"baseName": "path",
"type": "string"
},
{
"name": "port",
"baseName": "port",
"type": "number"
}
];
//# sourceMappingURL=apiextensionsV1ServiceReference.js.map
/***/ }),
/***/ 22775:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.ApiextensionsV1WebhookClientConfig = void 0;
/**
* WebhookClientConfig contains the information to make a TLS connection with the webhook.
*/
class ApiextensionsV1WebhookClientConfig {
static getAttributeTypeMap() {
return ApiextensionsV1WebhookClientConfig.attributeTypeMap;
}
}
exports.ApiextensionsV1WebhookClientConfig = ApiextensionsV1WebhookClientConfig;
ApiextensionsV1WebhookClientConfig.discriminator = undefined;
ApiextensionsV1WebhookClientConfig.attributeTypeMap = [
{
"name": "caBundle",
"baseName": "caBundle",
"type": "string"
},
{
"name": "service",
"baseName": "service",
"type": "ApiextensionsV1ServiceReference"
},
{
"name": "url",
"baseName": "url",
"type": "string"
}
];
//# sourceMappingURL=apiextensionsV1WebhookClientConfig.js.map
/***/ }),
/***/ 37492:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.ApiregistrationV1ServiceReference = void 0;
/**
* ServiceReference holds a reference to Service.legacy.k8s.io
*/
class ApiregistrationV1ServiceReference {
static getAttributeTypeMap() {
return ApiregistrationV1ServiceReference.attributeTypeMap;
}
}
exports.ApiregistrationV1ServiceReference = ApiregistrationV1ServiceReference;
ApiregistrationV1ServiceReference.discriminator = undefined;
ApiregistrationV1ServiceReference.attributeTypeMap = [
{
"name": "name",
"baseName": "name",
"type": "string"
},
{
"name": "namespace",
"baseName": "namespace",
"type": "string"
},
{
"name": "port",
"baseName": "port",
"type": "number"
}
];
//# sourceMappingURL=apiregistrationV1ServiceReference.js.map
/***/ }),
/***/ 25429:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.AuthenticationV1TokenRequest = void 0;
/**
* TokenRequest requests a token for a given service account.
*/
class AuthenticationV1TokenRequest {
static getAttributeTypeMap() {
return AuthenticationV1TokenRequest.attributeTypeMap;
}
}
exports.AuthenticationV1TokenRequest = AuthenticationV1TokenRequest;
AuthenticationV1TokenRequest.discriminator = undefined;
AuthenticationV1TokenRequest.attributeTypeMap = [
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "metadata",
"baseName": "metadata",
"type": "V1ObjectMeta"
},
{
"name": "spec",
"baseName": "spec",
"type": "V1TokenRequestSpec"
},
{
"name": "status",
"baseName": "status",
"type": "V1TokenRequestStatus"
}
];
//# sourceMappingURL=authenticationV1TokenRequest.js.map
/***/ }),
/***/ 81950:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.CoreV1EndpointPort = void 0;
/**
* EndpointPort is a tuple that describes a single port.
*/
class CoreV1EndpointPort {
static getAttributeTypeMap() {
return CoreV1EndpointPort.attributeTypeMap;
}
}
exports.CoreV1EndpointPort = CoreV1EndpointPort;
CoreV1EndpointPort.discriminator = undefined;
CoreV1EndpointPort.attributeTypeMap = [
{
"name": "appProtocol",
"baseName": "appProtocol",
"type": "string"
},
{
"name": "name",
"baseName": "name",
"type": "string"
},
{
"name": "port",
"baseName": "port",
"type": "number"
},
{
"name": "protocol",
"baseName": "protocol",
"type": "string"
}
];
//# sourceMappingURL=coreV1EndpointPort.js.map
/***/ }),
/***/ 42735:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.CoreV1Event = void 0;
/**
* Event is a report of an event somewhere in the cluster. Events have a limited retention time and triggers and messages may evolve with time. Event consumers should not rely on the timing of an event with a given Reason reflecting a consistent underlying trigger, or the continued existence of events with that Reason. Events should be treated as informative, best-effort, supplemental data.
*/
class CoreV1Event {
static getAttributeTypeMap() {
return CoreV1Event.attributeTypeMap;
}
}
exports.CoreV1Event = CoreV1Event;
CoreV1Event.discriminator = undefined;
CoreV1Event.attributeTypeMap = [
{
"name": "action",
"baseName": "action",
"type": "string"
},
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "count",
"baseName": "count",
"type": "number"
},
{
"name": "eventTime",
"baseName": "eventTime",
"type": "Date"
},
{
"name": "firstTimestamp",
"baseName": "firstTimestamp",
"type": "Date"
},
{
"name": "involvedObject",
"baseName": "involvedObject",
"type": "V1ObjectReference"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "lastTimestamp",
"baseName": "lastTimestamp",
"type": "Date"
},
{
"name": "message",
"baseName": "message",
"type": "string"
},
{
"name": "metadata",
"baseName": "metadata",
"type": "V1ObjectMeta"
},
{
"name": "reason",
"baseName": "reason",
"type": "string"
},
{
"name": "related",
"baseName": "related",
"type": "V1ObjectReference"
},
{
"name": "reportingComponent",
"baseName": "reportingComponent",
"type": "string"
},
{
"name": "reportingInstance",
"baseName": "reportingInstance",
"type": "string"
},
{
"name": "series",
"baseName": "series",
"type": "CoreV1EventSeries"
},
{
"name": "source",
"baseName": "source",
"type": "V1EventSource"
},
{
"name": "type",
"baseName": "type",
"type": "string"
}
];
//# sourceMappingURL=coreV1Event.js.map
/***/ }),
/***/ 12368:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.CoreV1EventList = void 0;
/**
* EventList is a list of events.
*/
class CoreV1EventList {
static getAttributeTypeMap() {
return CoreV1EventList.attributeTypeMap;
}
}
exports.CoreV1EventList = CoreV1EventList;
CoreV1EventList.discriminator = undefined;
CoreV1EventList.attributeTypeMap = [
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "items",
"baseName": "items",
"type": "Array"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "metadata",
"baseName": "metadata",
"type": "V1ListMeta"
}
];
//# sourceMappingURL=coreV1EventList.js.map
/***/ }),
/***/ 70438:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.CoreV1EventSeries = void 0;
/**
* EventSeries contain information on series of events, i.e. thing that was/is happening continuously for some time.
*/
class CoreV1EventSeries {
static getAttributeTypeMap() {
return CoreV1EventSeries.attributeTypeMap;
}
}
exports.CoreV1EventSeries = CoreV1EventSeries;
CoreV1EventSeries.discriminator = undefined;
CoreV1EventSeries.attributeTypeMap = [
{
"name": "count",
"baseName": "count",
"type": "number"
},
{
"name": "lastObservedTime",
"baseName": "lastObservedTime",
"type": "Date"
}
];
//# sourceMappingURL=coreV1EventSeries.js.map
/***/ }),
/***/ 75853:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.DiscoveryV1EndpointPort = void 0;
/**
* EndpointPort represents a Port used by an EndpointSlice
*/
class DiscoveryV1EndpointPort {
static getAttributeTypeMap() {
return DiscoveryV1EndpointPort.attributeTypeMap;
}
}
exports.DiscoveryV1EndpointPort = DiscoveryV1EndpointPort;
DiscoveryV1EndpointPort.discriminator = undefined;
DiscoveryV1EndpointPort.attributeTypeMap = [
{
"name": "appProtocol",
"baseName": "appProtocol",
"type": "string"
},
{
"name": "name",
"baseName": "name",
"type": "string"
},
{
"name": "port",
"baseName": "port",
"type": "number"
},
{
"name": "protocol",
"baseName": "protocol",
"type": "string"
}
];
//# sourceMappingURL=discoveryV1EndpointPort.js.map
/***/ }),
/***/ 52191:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.EventsV1Event = void 0;
/**
* Event is a report of an event somewhere in the cluster. It generally denotes some state change in the system. Events have a limited retention time and triggers and messages may evolve with time. Event consumers should not rely on the timing of an event with a given Reason reflecting a consistent underlying trigger, or the continued existence of events with that Reason. Events should be treated as informative, best-effort, supplemental data.
*/
class EventsV1Event {
static getAttributeTypeMap() {
return EventsV1Event.attributeTypeMap;
}
}
exports.EventsV1Event = EventsV1Event;
EventsV1Event.discriminator = undefined;
EventsV1Event.attributeTypeMap = [
{
"name": "action",
"baseName": "action",
"type": "string"
},
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "deprecatedCount",
"baseName": "deprecatedCount",
"type": "number"
},
{
"name": "deprecatedFirstTimestamp",
"baseName": "deprecatedFirstTimestamp",
"type": "Date"
},
{
"name": "deprecatedLastTimestamp",
"baseName": "deprecatedLastTimestamp",
"type": "Date"
},
{
"name": "deprecatedSource",
"baseName": "deprecatedSource",
"type": "V1EventSource"
},
{
"name": "eventTime",
"baseName": "eventTime",
"type": "Date"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "metadata",
"baseName": "metadata",
"type": "V1ObjectMeta"
},
{
"name": "note",
"baseName": "note",
"type": "string"
},
{
"name": "reason",
"baseName": "reason",
"type": "string"
},
{
"name": "regarding",
"baseName": "regarding",
"type": "V1ObjectReference"
},
{
"name": "related",
"baseName": "related",
"type": "V1ObjectReference"
},
{
"name": "reportingController",
"baseName": "reportingController",
"type": "string"
},
{
"name": "reportingInstance",
"baseName": "reportingInstance",
"type": "string"
},
{
"name": "series",
"baseName": "series",
"type": "EventsV1EventSeries"
},
{
"name": "type",
"baseName": "type",
"type": "string"
}
];
//# sourceMappingURL=eventsV1Event.js.map
/***/ }),
/***/ 1051:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.EventsV1EventList = void 0;
/**
* EventList is a list of Event objects.
*/
class EventsV1EventList {
static getAttributeTypeMap() {
return EventsV1EventList.attributeTypeMap;
}
}
exports.EventsV1EventList = EventsV1EventList;
EventsV1EventList.discriminator = undefined;
EventsV1EventList.attributeTypeMap = [
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "items",
"baseName": "items",
"type": "Array"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "metadata",
"baseName": "metadata",
"type": "V1ListMeta"
}
];
//# sourceMappingURL=eventsV1EventList.js.map
/***/ }),
/***/ 6933:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.EventsV1EventSeries = void 0;
/**
* EventSeries contain information on series of events, i.e. thing that was/is happening continuously for some time. How often to update the EventSeries is up to the event reporters. The default event reporter in \"k8s.io/client-go/tools/events/event_broadcaster.go\" shows how this struct is updated on heartbeats and can guide customized reporter implementations.
*/
class EventsV1EventSeries {
static getAttributeTypeMap() {
return EventsV1EventSeries.attributeTypeMap;
}
}
exports.EventsV1EventSeries = EventsV1EventSeries;
EventsV1EventSeries.discriminator = undefined;
EventsV1EventSeries.attributeTypeMap = [
{
"name": "count",
"baseName": "count",
"type": "number"
},
{
"name": "lastObservedTime",
"baseName": "lastObservedTime",
"type": "Date"
}
];
//# sourceMappingURL=eventsV1EventSeries.js.map
/***/ }),
/***/ 15158:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.VoidAuth = exports.OAuth = exports.ApiKeyAuth = exports.HttpBearerAuth = exports.HttpBasicAuth = exports.ObjectSerializer = void 0;
const tslib_1 = __nccwpck_require__(4351);
tslib_1.__exportStar(__nccwpck_require__(21616), exports);
tslib_1.__exportStar(__nccwpck_require__(7818), exports);
tslib_1.__exportStar(__nccwpck_require__(63536), exports);
tslib_1.__exportStar(__nccwpck_require__(22775), exports);
tslib_1.__exportStar(__nccwpck_require__(37492), exports);
tslib_1.__exportStar(__nccwpck_require__(25429), exports);
tslib_1.__exportStar(__nccwpck_require__(81950), exports);
tslib_1.__exportStar(__nccwpck_require__(42735), exports);
tslib_1.__exportStar(__nccwpck_require__(12368), exports);
tslib_1.__exportStar(__nccwpck_require__(70438), exports);
tslib_1.__exportStar(__nccwpck_require__(75853), exports);
tslib_1.__exportStar(__nccwpck_require__(52191), exports);
tslib_1.__exportStar(__nccwpck_require__(1051), exports);
tslib_1.__exportStar(__nccwpck_require__(6933), exports);
tslib_1.__exportStar(__nccwpck_require__(25958), exports);
tslib_1.__exportStar(__nccwpck_require__(44481), exports);
tslib_1.__exportStar(__nccwpck_require__(52906), exports);
tslib_1.__exportStar(__nccwpck_require__(89033), exports);
tslib_1.__exportStar(__nccwpck_require__(5454), exports);
tslib_1.__exportStar(__nccwpck_require__(99042), exports);
tslib_1.__exportStar(__nccwpck_require__(58352), exports);
tslib_1.__exportStar(__nccwpck_require__(87198), exports);
tslib_1.__exportStar(__nccwpck_require__(61496), exports);
tslib_1.__exportStar(__nccwpck_require__(17883), exports);
tslib_1.__exportStar(__nccwpck_require__(93135), exports);
tslib_1.__exportStar(__nccwpck_require__(39808), exports);
tslib_1.__exportStar(__nccwpck_require__(61957), exports);
tslib_1.__exportStar(__nccwpck_require__(90312), exports);
tslib_1.__exportStar(__nccwpck_require__(97069), exports);
tslib_1.__exportStar(__nccwpck_require__(91312), exports);
tslib_1.__exportStar(__nccwpck_require__(6336), exports);
tslib_1.__exportStar(__nccwpck_require__(95073), exports);
tslib_1.__exportStar(__nccwpck_require__(48551), exports);
tslib_1.__exportStar(__nccwpck_require__(68849), exports);
tslib_1.__exportStar(__nccwpck_require__(34144), exports);
tslib_1.__exportStar(__nccwpck_require__(84881), exports);
tslib_1.__exportStar(__nccwpck_require__(11582), exports);
tslib_1.__exportStar(__nccwpck_require__(74315), exports);
tslib_1.__exportStar(__nccwpck_require__(90288), exports);
tslib_1.__exportStar(__nccwpck_require__(24000), exports);
tslib_1.__exportStar(__nccwpck_require__(75636), exports);
tslib_1.__exportStar(__nccwpck_require__(98367), exports);
tslib_1.__exportStar(__nccwpck_require__(87598), exports);
tslib_1.__exportStar(__nccwpck_require__(82975), exports);
tslib_1.__exportStar(__nccwpck_require__(14268), exports);
tslib_1.__exportStar(__nccwpck_require__(84957), exports);
tslib_1.__exportStar(__nccwpck_require__(99084), exports);
tslib_1.__exportStar(__nccwpck_require__(92932), exports);
tslib_1.__exportStar(__nccwpck_require__(31530), exports);
tslib_1.__exportStar(__nccwpck_require__(37759), exports);
tslib_1.__exportStar(__nccwpck_require__(38285), exports);
tslib_1.__exportStar(__nccwpck_require__(41888), exports);
tslib_1.__exportStar(__nccwpck_require__(19111), exports);
tslib_1.__exportStar(__nccwpck_require__(33913), exports);
tslib_1.__exportStar(__nccwpck_require__(61458), exports);
tslib_1.__exportStar(__nccwpck_require__(32315), exports);
tslib_1.__exportStar(__nccwpck_require__(21181), exports);
tslib_1.__exportStar(__nccwpck_require__(95532), exports);
tslib_1.__exportStar(__nccwpck_require__(30578), exports);
tslib_1.__exportStar(__nccwpck_require__(2047), exports);
tslib_1.__exportStar(__nccwpck_require__(38596), exports);
tslib_1.__exportStar(__nccwpck_require__(34990), exports);
tslib_1.__exportStar(__nccwpck_require__(42874), exports);
tslib_1.__exportStar(__nccwpck_require__(99685), exports);
tslib_1.__exportStar(__nccwpck_require__(62892), exports);
tslib_1.__exportStar(__nccwpck_require__(80512), exports);
tslib_1.__exportStar(__nccwpck_require__(56709), exports);
tslib_1.__exportStar(__nccwpck_require__(61682), exports);
tslib_1.__exportStar(__nccwpck_require__(59708), exports);
tslib_1.__exportStar(__nccwpck_require__(52865), exports);
tslib_1.__exportStar(__nccwpck_require__(13501), exports);
tslib_1.__exportStar(__nccwpck_require__(50217), exports);
tslib_1.__exportStar(__nccwpck_require__(83765), exports);
tslib_1.__exportStar(__nccwpck_require__(89767), exports);
tslib_1.__exportStar(__nccwpck_require__(27892), exports);
tslib_1.__exportStar(__nccwpck_require__(19716), exports);
tslib_1.__exportStar(__nccwpck_require__(35980), exports);
tslib_1.__exportStar(__nccwpck_require__(78405), exports);
tslib_1.__exportStar(__nccwpck_require__(66304), exports);
tslib_1.__exportStar(__nccwpck_require__(54382), exports);
tslib_1.__exportStar(__nccwpck_require__(72565), exports);
tslib_1.__exportStar(__nccwpck_require__(7011), exports);
tslib_1.__exportStar(__nccwpck_require__(24600), exports);
tslib_1.__exportStar(__nccwpck_require__(34233), exports);
tslib_1.__exportStar(__nccwpck_require__(94346), exports);
tslib_1.__exportStar(__nccwpck_require__(9731), exports);
tslib_1.__exportStar(__nccwpck_require__(40325), exports);
tslib_1.__exportStar(__nccwpck_require__(32791), exports);
tslib_1.__exportStar(__nccwpck_require__(10486), exports);
tslib_1.__exportStar(__nccwpck_require__(69798), exports);
tslib_1.__exportStar(__nccwpck_require__(20486), exports);
tslib_1.__exportStar(__nccwpck_require__(25713), exports);
tslib_1.__exportStar(__nccwpck_require__(82283), exports);
tslib_1.__exportStar(__nccwpck_require__(98087), exports);
tslib_1.__exportStar(__nccwpck_require__(94579), exports);
tslib_1.__exportStar(__nccwpck_require__(25408), exports);
tslib_1.__exportStar(__nccwpck_require__(37060), exports);
tslib_1.__exportStar(__nccwpck_require__(32699), exports);
tslib_1.__exportStar(__nccwpck_require__(77063), exports);
tslib_1.__exportStar(__nccwpck_require__(173), exports);
tslib_1.__exportStar(__nccwpck_require__(44560), exports);
tslib_1.__exportStar(__nccwpck_require__(80195), exports);
tslib_1.__exportStar(__nccwpck_require__(48451), exports);
tslib_1.__exportStar(__nccwpck_require__(18029), exports);
tslib_1.__exportStar(__nccwpck_require__(65310), exports);
tslib_1.__exportStar(__nccwpck_require__(95602), exports);
tslib_1.__exportStar(__nccwpck_require__(81364), exports);
tslib_1.__exportStar(__nccwpck_require__(41298), exports);
tslib_1.__exportStar(__nccwpck_require__(55398), exports);
tslib_1.__exportStar(__nccwpck_require__(34981), exports);
tslib_1.__exportStar(__nccwpck_require__(38099), exports);
tslib_1.__exportStar(__nccwpck_require__(78901), exports);
tslib_1.__exportStar(__nccwpck_require__(19493), exports);
tslib_1.__exportStar(__nccwpck_require__(11672), exports);
tslib_1.__exportStar(__nccwpck_require__(17252), exports);
tslib_1.__exportStar(__nccwpck_require__(57151), exports);
tslib_1.__exportStar(__nccwpck_require__(70435), exports);
tslib_1.__exportStar(__nccwpck_require__(97000), exports);
tslib_1.__exportStar(__nccwpck_require__(53708), exports);
tslib_1.__exportStar(__nccwpck_require__(6223), exports);
tslib_1.__exportStar(__nccwpck_require__(31925), exports);
tslib_1.__exportStar(__nccwpck_require__(13449), exports);
tslib_1.__exportStar(__nccwpck_require__(95223), exports);
tslib_1.__exportStar(__nccwpck_require__(23074), exports);
tslib_1.__exportStar(__nccwpck_require__(36874), exports);
tslib_1.__exportStar(__nccwpck_require__(17205), exports);
tslib_1.__exportStar(__nccwpck_require__(32671), exports);
tslib_1.__exportStar(__nccwpck_require__(90017), exports);
tslib_1.__exportStar(__nccwpck_require__(97764), exports);
tslib_1.__exportStar(__nccwpck_require__(87969), exports);
tslib_1.__exportStar(__nccwpck_require__(13313), exports);
tslib_1.__exportStar(__nccwpck_require__(77213), exports);
tslib_1.__exportStar(__nccwpck_require__(35093), exports);
tslib_1.__exportStar(__nccwpck_require__(91874), exports);
tslib_1.__exportStar(__nccwpck_require__(16690), exports);
tslib_1.__exportStar(__nccwpck_require__(10414), exports);
tslib_1.__exportStar(__nccwpck_require__(3439), exports);
tslib_1.__exportStar(__nccwpck_require__(1016), exports);
tslib_1.__exportStar(__nccwpck_require__(27584), exports);
tslib_1.__exportStar(__nccwpck_require__(97617), exports);
tslib_1.__exportStar(__nccwpck_require__(37426), exports);
tslib_1.__exportStar(__nccwpck_require__(87855), exports);
tslib_1.__exportStar(__nccwpck_require__(16636), exports);
tslib_1.__exportStar(__nccwpck_require__(3437), exports);
tslib_1.__exportStar(__nccwpck_require__(86769), exports);
tslib_1.__exportStar(__nccwpck_require__(56219), exports);
tslib_1.__exportStar(__nccwpck_require__(95179), exports);
tslib_1.__exportStar(__nccwpck_require__(93652), exports);
tslib_1.__exportStar(__nccwpck_require__(17024), exports);
tslib_1.__exportStar(__nccwpck_require__(49823), exports);
tslib_1.__exportStar(__nccwpck_require__(50910), exports);
tslib_1.__exportStar(__nccwpck_require__(72796), exports);
tslib_1.__exportStar(__nccwpck_require__(69225), exports);
tslib_1.__exportStar(__nccwpck_require__(49202), exports);
tslib_1.__exportStar(__nccwpck_require__(83570), exports);
tslib_1.__exportStar(__nccwpck_require__(68021), exports);
tslib_1.__exportStar(__nccwpck_require__(32492), exports);
tslib_1.__exportStar(__nccwpck_require__(44340), exports);
tslib_1.__exportStar(__nccwpck_require__(93865), exports);
tslib_1.__exportStar(__nccwpck_require__(76125), exports);
tslib_1.__exportStar(__nccwpck_require__(76672), exports);
tslib_1.__exportStar(__nccwpck_require__(92069), exports);
tslib_1.__exportStar(__nccwpck_require__(43693), exports);
tslib_1.__exportStar(__nccwpck_require__(89541), exports);
tslib_1.__exportStar(__nccwpck_require__(62476), exports);
tslib_1.__exportStar(__nccwpck_require__(59689), exports);
tslib_1.__exportStar(__nccwpck_require__(45830), exports);
tslib_1.__exportStar(__nccwpck_require__(23037), exports);
tslib_1.__exportStar(__nccwpck_require__(63580), exports);
tslib_1.__exportStar(__nccwpck_require__(91260), exports);
tslib_1.__exportStar(__nccwpck_require__(94069), exports);
tslib_1.__exportStar(__nccwpck_require__(75711), exports);
tslib_1.__exportStar(__nccwpck_require__(93114), exports);
tslib_1.__exportStar(__nccwpck_require__(57345), exports);
tslib_1.__exportStar(__nccwpck_require__(96227), exports);
tslib_1.__exportStar(__nccwpck_require__(23549), exports);
tslib_1.__exportStar(__nccwpck_require__(22567), exports);
tslib_1.__exportStar(__nccwpck_require__(50993), exports);
tslib_1.__exportStar(__nccwpck_require__(98844), exports);
tslib_1.__exportStar(__nccwpck_require__(76838), exports);
tslib_1.__exportStar(__nccwpck_require__(79083), exports);
tslib_1.__exportStar(__nccwpck_require__(41500), exports);
tslib_1.__exportStar(__nccwpck_require__(86280), exports);
tslib_1.__exportStar(__nccwpck_require__(91128), exports);
tslib_1.__exportStar(__nccwpck_require__(82578), exports);
tslib_1.__exportStar(__nccwpck_require__(83039), exports);
tslib_1.__exportStar(__nccwpck_require__(88593), exports);
tslib_1.__exportStar(__nccwpck_require__(25667), exports);
tslib_1.__exportStar(__nccwpck_require__(46630), exports);
tslib_1.__exportStar(__nccwpck_require__(12229), exports);
tslib_1.__exportStar(__nccwpck_require__(31674), exports);
tslib_1.__exportStar(__nccwpck_require__(72729), exports);
tslib_1.__exportStar(__nccwpck_require__(82187), exports);
tslib_1.__exportStar(__nccwpck_require__(95354), exports);
tslib_1.__exportStar(__nccwpck_require__(2006), exports);
tslib_1.__exportStar(__nccwpck_require__(22665), exports);
tslib_1.__exportStar(__nccwpck_require__(35432), exports);
tslib_1.__exportStar(__nccwpck_require__(95469), exports);
tslib_1.__exportStar(__nccwpck_require__(314), exports);
tslib_1.__exportStar(__nccwpck_require__(22366), exports);
tslib_1.__exportStar(__nccwpck_require__(49076), exports);
tslib_1.__exportStar(__nccwpck_require__(8833), exports);
tslib_1.__exportStar(__nccwpck_require__(47995), exports);
tslib_1.__exportStar(__nccwpck_require__(60886), exports);
tslib_1.__exportStar(__nccwpck_require__(89952), exports);
tslib_1.__exportStar(__nccwpck_require__(74436), exports);
tslib_1.__exportStar(__nccwpck_require__(22173), exports);
tslib_1.__exportStar(__nccwpck_require__(71056), exports);
tslib_1.__exportStar(__nccwpck_require__(63061), exports);
tslib_1.__exportStar(__nccwpck_require__(3667), exports);
tslib_1.__exportStar(__nccwpck_require__(47532), exports);
tslib_1.__exportStar(__nccwpck_require__(10627), exports);
tslib_1.__exportStar(__nccwpck_require__(11740), exports);
tslib_1.__exportStar(__nccwpck_require__(4272), exports);
tslib_1.__exportStar(__nccwpck_require__(10912), exports);
tslib_1.__exportStar(__nccwpck_require__(24894), exports);
tslib_1.__exportStar(__nccwpck_require__(42762), exports);
tslib_1.__exportStar(__nccwpck_require__(32293), exports);
tslib_1.__exportStar(__nccwpck_require__(85161), exports);
tslib_1.__exportStar(__nccwpck_require__(51128), exports);
tslib_1.__exportStar(__nccwpck_require__(41752), exports);
tslib_1.__exportStar(__nccwpck_require__(21656), exports);
tslib_1.__exportStar(__nccwpck_require__(33645), exports);
tslib_1.__exportStar(__nccwpck_require__(70019), exports);
tslib_1.__exportStar(__nccwpck_require__(99191), exports);
tslib_1.__exportStar(__nccwpck_require__(86171), exports);
tslib_1.__exportStar(__nccwpck_require__(44696), exports);
tslib_1.__exportStar(__nccwpck_require__(19051), exports);
tslib_1.__exportStar(__nccwpck_require__(90114), exports);
tslib_1.__exportStar(__nccwpck_require__(7924), exports);
tslib_1.__exportStar(__nccwpck_require__(25570), exports);
tslib_1.__exportStar(__nccwpck_require__(89974), exports);
tslib_1.__exportStar(__nccwpck_require__(32966), exports);
tslib_1.__exportStar(__nccwpck_require__(78594), exports);
tslib_1.__exportStar(__nccwpck_require__(99911), exports);
tslib_1.__exportStar(__nccwpck_require__(42951), exports);
tslib_1.__exportStar(__nccwpck_require__(92114), exports);
tslib_1.__exportStar(__nccwpck_require__(69811), exports);
tslib_1.__exportStar(__nccwpck_require__(86312), exports);
tslib_1.__exportStar(__nccwpck_require__(86628), exports);
tslib_1.__exportStar(__nccwpck_require__(19839), exports);
tslib_1.__exportStar(__nccwpck_require__(51817), exports);
tslib_1.__exportStar(__nccwpck_require__(99975), exports);
tslib_1.__exportStar(__nccwpck_require__(509), exports);
tslib_1.__exportStar(__nccwpck_require__(65970), exports);
tslib_1.__exportStar(__nccwpck_require__(19574), exports);
tslib_1.__exportStar(__nccwpck_require__(78045), exports);
tslib_1.__exportStar(__nccwpck_require__(67831), exports);
tslib_1.__exportStar(__nccwpck_require__(74548), exports);
tslib_1.__exportStar(__nccwpck_require__(61215), exports);
tslib_1.__exportStar(__nccwpck_require__(67829), exports);
tslib_1.__exportStar(__nccwpck_require__(39899), exports);
tslib_1.__exportStar(__nccwpck_require__(22547), exports);
tslib_1.__exportStar(__nccwpck_require__(76774), exports);
tslib_1.__exportStar(__nccwpck_require__(71948), exports);
tslib_1.__exportStar(__nccwpck_require__(84135), exports);
tslib_1.__exportStar(__nccwpck_require__(79850), exports);
tslib_1.__exportStar(__nccwpck_require__(58881), exports);
tslib_1.__exportStar(__nccwpck_require__(42892), exports);
tslib_1.__exportStar(__nccwpck_require__(39894), exports);
tslib_1.__exportStar(__nccwpck_require__(88279), exports);
tslib_1.__exportStar(__nccwpck_require__(97621), exports);
tslib_1.__exportStar(__nccwpck_require__(74625), exports);
tslib_1.__exportStar(__nccwpck_require__(85571), exports);
tslib_1.__exportStar(__nccwpck_require__(3317), exports);
tslib_1.__exportStar(__nccwpck_require__(85751), exports);
tslib_1.__exportStar(__nccwpck_require__(50837), exports);
tslib_1.__exportStar(__nccwpck_require__(35698), exports);
tslib_1.__exportStar(__nccwpck_require__(80966), exports);
tslib_1.__exportStar(__nccwpck_require__(43933), exports);
tslib_1.__exportStar(__nccwpck_require__(54662), exports);
tslib_1.__exportStar(__nccwpck_require__(16954), exports);
tslib_1.__exportStar(__nccwpck_require__(70634), exports);
tslib_1.__exportStar(__nccwpck_require__(26573), exports);
tslib_1.__exportStar(__nccwpck_require__(69009), exports);
tslib_1.__exportStar(__nccwpck_require__(14870), exports);
tslib_1.__exportStar(__nccwpck_require__(40475), exports);
tslib_1.__exportStar(__nccwpck_require__(90975), exports);
tslib_1.__exportStar(__nccwpck_require__(66859), exports);
tslib_1.__exportStar(__nccwpck_require__(64888), exports);
tslib_1.__exportStar(__nccwpck_require__(36376), exports);
tslib_1.__exportStar(__nccwpck_require__(8350), exports);
tslib_1.__exportStar(__nccwpck_require__(21782), exports);
tslib_1.__exportStar(__nccwpck_require__(19870), exports);
tslib_1.__exportStar(__nccwpck_require__(94221), exports);
tslib_1.__exportStar(__nccwpck_require__(10936), exports);
tslib_1.__exportStar(__nccwpck_require__(5827), exports);
tslib_1.__exportStar(__nccwpck_require__(48994), exports);
tslib_1.__exportStar(__nccwpck_require__(55397), exports);
tslib_1.__exportStar(__nccwpck_require__(91686), exports);
tslib_1.__exportStar(__nccwpck_require__(22421), exports);
tslib_1.__exportStar(__nccwpck_require__(1581), exports);
tslib_1.__exportStar(__nccwpck_require__(61114), exports);
tslib_1.__exportStar(__nccwpck_require__(77568), exports);
tslib_1.__exportStar(__nccwpck_require__(55014), exports);
tslib_1.__exportStar(__nccwpck_require__(67214), exports);
tslib_1.__exportStar(__nccwpck_require__(56149), exports);
tslib_1.__exportStar(__nccwpck_require__(46136), exports);
tslib_1.__exportStar(__nccwpck_require__(70215), exports);
tslib_1.__exportStar(__nccwpck_require__(37088), exports);
tslib_1.__exportStar(__nccwpck_require__(1824), exports);
tslib_1.__exportStar(__nccwpck_require__(31828), exports);
tslib_1.__exportStar(__nccwpck_require__(96736), exports);
tslib_1.__exportStar(__nccwpck_require__(99411), exports);
tslib_1.__exportStar(__nccwpck_require__(9764), exports);
tslib_1.__exportStar(__nccwpck_require__(21058), exports);
tslib_1.__exportStar(__nccwpck_require__(31382), exports);
tslib_1.__exportStar(__nccwpck_require__(15895), exports);
tslib_1.__exportStar(__nccwpck_require__(56891), exports);
tslib_1.__exportStar(__nccwpck_require__(79991), exports);
tslib_1.__exportStar(__nccwpck_require__(60711), exports);
tslib_1.__exportStar(__nccwpck_require__(25888), exports);
tslib_1.__exportStar(__nccwpck_require__(845), exports);
tslib_1.__exportStar(__nccwpck_require__(49696), exports);
tslib_1.__exportStar(__nccwpck_require__(7056), exports);
tslib_1.__exportStar(__nccwpck_require__(3884), exports);
tslib_1.__exportStar(__nccwpck_require__(4248), exports);
tslib_1.__exportStar(__nccwpck_require__(39203), exports);
tslib_1.__exportStar(__nccwpck_require__(33725), exports);
tslib_1.__exportStar(__nccwpck_require__(19078), exports);
tslib_1.__exportStar(__nccwpck_require__(98113), exports);
tslib_1.__exportStar(__nccwpck_require__(15598), exports);
tslib_1.__exportStar(__nccwpck_require__(39191), exports);
tslib_1.__exportStar(__nccwpck_require__(84279), exports);
tslib_1.__exportStar(__nccwpck_require__(56581), exports);
tslib_1.__exportStar(__nccwpck_require__(30254), exports);
tslib_1.__exportStar(__nccwpck_require__(87928), exports);
tslib_1.__exportStar(__nccwpck_require__(9350), exports);
tslib_1.__exportStar(__nccwpck_require__(38169), exports);
tslib_1.__exportStar(__nccwpck_require__(18640), exports);
tslib_1.__exportStar(__nccwpck_require__(25927), exports);
tslib_1.__exportStar(__nccwpck_require__(26839), exports);
tslib_1.__exportStar(__nccwpck_require__(46881), exports);
tslib_1.__exportStar(__nccwpck_require__(96339), exports);
tslib_1.__exportStar(__nccwpck_require__(62890), exports);
tslib_1.__exportStar(__nccwpck_require__(69127), exports);
tslib_1.__exportStar(__nccwpck_require__(76275), exports);
tslib_1.__exportStar(__nccwpck_require__(49545), exports);
tslib_1.__exportStar(__nccwpck_require__(9927), exports);
tslib_1.__exportStar(__nccwpck_require__(18622), exports);
tslib_1.__exportStar(__nccwpck_require__(95926), exports);
tslib_1.__exportStar(__nccwpck_require__(48971), exports);
tslib_1.__exportStar(__nccwpck_require__(31592), exports);
tslib_1.__exportStar(__nccwpck_require__(83459), exports);
tslib_1.__exportStar(__nccwpck_require__(9077), exports);
tslib_1.__exportStar(__nccwpck_require__(70127), exports);
tslib_1.__exportStar(__nccwpck_require__(53615), exports);
tslib_1.__exportStar(__nccwpck_require__(14610), exports);
tslib_1.__exportStar(__nccwpck_require__(60878), exports);
tslib_1.__exportStar(__nccwpck_require__(1655), exports);
tslib_1.__exportStar(__nccwpck_require__(87717), exports);
tslib_1.__exportStar(__nccwpck_require__(34417), exports);
tslib_1.__exportStar(__nccwpck_require__(62967), exports);
tslib_1.__exportStar(__nccwpck_require__(41434), exports);
tslib_1.__exportStar(__nccwpck_require__(55885), exports);
tslib_1.__exportStar(__nccwpck_require__(20317), exports);
tslib_1.__exportStar(__nccwpck_require__(65055), exports);
tslib_1.__exportStar(__nccwpck_require__(46022), exports);
tslib_1.__exportStar(__nccwpck_require__(38664), exports);
tslib_1.__exportStar(__nccwpck_require__(93238), exports);
tslib_1.__exportStar(__nccwpck_require__(6538), exports);
tslib_1.__exportStar(__nccwpck_require__(94719), exports);
tslib_1.__exportStar(__nccwpck_require__(26379), exports);
tslib_1.__exportStar(__nccwpck_require__(14361), exports);
tslib_1.__exportStar(__nccwpck_require__(86872), exports);
tslib_1.__exportStar(__nccwpck_require__(89521), exports);
tslib_1.__exportStar(__nccwpck_require__(6602), exports);
tslib_1.__exportStar(__nccwpck_require__(95702), exports);
tslib_1.__exportStar(__nccwpck_require__(75476), exports);
tslib_1.__exportStar(__nccwpck_require__(67027), exports);
tslib_1.__exportStar(__nccwpck_require__(98205), exports);
tslib_1.__exportStar(__nccwpck_require__(3099), exports);
tslib_1.__exportStar(__nccwpck_require__(61999), exports);
tslib_1.__exportStar(__nccwpck_require__(96086), exports);
tslib_1.__exportStar(__nccwpck_require__(50793), exports);
tslib_1.__exportStar(__nccwpck_require__(81906), exports);
tslib_1.__exportStar(__nccwpck_require__(92848), exports);
tslib_1.__exportStar(__nccwpck_require__(69489), exports);
tslib_1.__exportStar(__nccwpck_require__(12040), exports);
tslib_1.__exportStar(__nccwpck_require__(67225), exports);
tslib_1.__exportStar(__nccwpck_require__(6290), exports);
tslib_1.__exportStar(__nccwpck_require__(33698), exports);
tslib_1.__exportStar(__nccwpck_require__(3991), exports);
tslib_1.__exportStar(__nccwpck_require__(59985), exports);
tslib_1.__exportStar(__nccwpck_require__(52589), exports);
tslib_1.__exportStar(__nccwpck_require__(67377), exports);
tslib_1.__exportStar(__nccwpck_require__(5757), exports);
tslib_1.__exportStar(__nccwpck_require__(49592), exports);
tslib_1.__exportStar(__nccwpck_require__(35568), exports);
tslib_1.__exportStar(__nccwpck_require__(5287), exports);
tslib_1.__exportStar(__nccwpck_require__(76193), exports);
tslib_1.__exportStar(__nccwpck_require__(29380), exports);
tslib_1.__exportStar(__nccwpck_require__(33927), exports);
tslib_1.__exportStar(__nccwpck_require__(65276), exports);
tslib_1.__exportStar(__nccwpck_require__(83787), exports);
tslib_1.__exportStar(__nccwpck_require__(90989), exports);
tslib_1.__exportStar(__nccwpck_require__(8070), exports);
tslib_1.__exportStar(__nccwpck_require__(61014), exports);
tslib_1.__exportStar(__nccwpck_require__(89642), exports);
tslib_1.__exportStar(__nccwpck_require__(15220), exports);
tslib_1.__exportStar(__nccwpck_require__(45910), exports);
tslib_1.__exportStar(__nccwpck_require__(32036), exports);
tslib_1.__exportStar(__nccwpck_require__(53079), exports);
tslib_1.__exportStar(__nccwpck_require__(39479), exports);
tslib_1.__exportStar(__nccwpck_require__(56871), exports);
tslib_1.__exportStar(__nccwpck_require__(66602), exports);
tslib_1.__exportStar(__nccwpck_require__(41934), exports);
tslib_1.__exportStar(__nccwpck_require__(3593), exports);
tslib_1.__exportStar(__nccwpck_require__(12511), exports);
tslib_1.__exportStar(__nccwpck_require__(47647), exports);
tslib_1.__exportStar(__nccwpck_require__(54349), exports);
tslib_1.__exportStar(__nccwpck_require__(20058), exports);
tslib_1.__exportStar(__nccwpck_require__(53792), exports);
tslib_1.__exportStar(__nccwpck_require__(20970), exports);
tslib_1.__exportStar(__nccwpck_require__(69903), exports);
tslib_1.__exportStar(__nccwpck_require__(88392), exports);
tslib_1.__exportStar(__nccwpck_require__(49929), exports);
tslib_1.__exportStar(__nccwpck_require__(23402), exports);
tslib_1.__exportStar(__nccwpck_require__(49584), exports);
tslib_1.__exportStar(__nccwpck_require__(94030), exports);
tslib_1.__exportStar(__nccwpck_require__(39991), exports);
tslib_1.__exportStar(__nccwpck_require__(7724), exports);
tslib_1.__exportStar(__nccwpck_require__(66666), exports);
tslib_1.__exportStar(__nccwpck_require__(29863), exports);
tslib_1.__exportStar(__nccwpck_require__(30594), exports);
tslib_1.__exportStar(__nccwpck_require__(1496), exports);
tslib_1.__exportStar(__nccwpck_require__(21270), exports);
tslib_1.__exportStar(__nccwpck_require__(9165), exports);
tslib_1.__exportStar(__nccwpck_require__(64672), exports);
tslib_1.__exportStar(__nccwpck_require__(60049), exports);
tslib_1.__exportStar(__nccwpck_require__(61730), exports);
tslib_1.__exportStar(__nccwpck_require__(37085), exports);
tslib_1.__exportStar(__nccwpck_require__(35081), exports);
tslib_1.__exportStar(__nccwpck_require__(7423), exports);
tslib_1.__exportStar(__nccwpck_require__(26777), exports);
tslib_1.__exportStar(__nccwpck_require__(98830), exports);
tslib_1.__exportStar(__nccwpck_require__(93967), exports);
tslib_1.__exportStar(__nccwpck_require__(64484), exports);
tslib_1.__exportStar(__nccwpck_require__(63533), exports);
tslib_1.__exportStar(__nccwpck_require__(57091), exports);
tslib_1.__exportStar(__nccwpck_require__(98441), exports);
tslib_1.__exportStar(__nccwpck_require__(30089), exports);
tslib_1.__exportStar(__nccwpck_require__(43801), exports);
tslib_1.__exportStar(__nccwpck_require__(58382), exports);
tslib_1.__exportStar(__nccwpck_require__(84478), exports);
tslib_1.__exportStar(__nccwpck_require__(8076), exports);
tslib_1.__exportStar(__nccwpck_require__(53942), exports);
tslib_1.__exportStar(__nccwpck_require__(51807), exports);
tslib_1.__exportStar(__nccwpck_require__(59514), exports);
tslib_1.__exportStar(__nccwpck_require__(96831), exports);
tslib_1.__exportStar(__nccwpck_require__(75855), exports);
tslib_1.__exportStar(__nccwpck_require__(8326), exports);
tslib_1.__exportStar(__nccwpck_require__(40541), exports);
tslib_1.__exportStar(__nccwpck_require__(81655), exports);
tslib_1.__exportStar(__nccwpck_require__(34396), exports);
tslib_1.__exportStar(__nccwpck_require__(43485), exports);
tslib_1.__exportStar(__nccwpck_require__(63931), exports);
tslib_1.__exportStar(__nccwpck_require__(23257), exports);
tslib_1.__exportStar(__nccwpck_require__(84404), exports);
tslib_1.__exportStar(__nccwpck_require__(44289), exports);
tslib_1.__exportStar(__nccwpck_require__(90147), exports);
tslib_1.__exportStar(__nccwpck_require__(72683), exports);
tslib_1.__exportStar(__nccwpck_require__(75714), exports);
tslib_1.__exportStar(__nccwpck_require__(67813), exports);
tslib_1.__exportStar(__nccwpck_require__(60270), exports);
tslib_1.__exportStar(__nccwpck_require__(90435), exports);
tslib_1.__exportStar(__nccwpck_require__(42319), exports);
tslib_1.__exportStar(__nccwpck_require__(10530), exports);
tslib_1.__exportStar(__nccwpck_require__(22546), exports);
tslib_1.__exportStar(__nccwpck_require__(62252), exports);
tslib_1.__exportStar(__nccwpck_require__(5461), exports);
tslib_1.__exportStar(__nccwpck_require__(65831), exports);
tslib_1.__exportStar(__nccwpck_require__(31079), exports);
tslib_1.__exportStar(__nccwpck_require__(75281), exports);
tslib_1.__exportStar(__nccwpck_require__(8109), exports);
tslib_1.__exportStar(__nccwpck_require__(50769), exports);
tslib_1.__exportStar(__nccwpck_require__(49098), exports);
tslib_1.__exportStar(__nccwpck_require__(34651), exports);
tslib_1.__exportStar(__nccwpck_require__(473), exports);
tslib_1.__exportStar(__nccwpck_require__(44509), exports);
tslib_1.__exportStar(__nccwpck_require__(12802), exports);
tslib_1.__exportStar(__nccwpck_require__(11202), exports);
tslib_1.__exportStar(__nccwpck_require__(37196), exports);
tslib_1.__exportStar(__nccwpck_require__(27287), exports);
tslib_1.__exportStar(__nccwpck_require__(36502), exports);
tslib_1.__exportStar(__nccwpck_require__(43128), exports);
tslib_1.__exportStar(__nccwpck_require__(96606), exports);
tslib_1.__exportStar(__nccwpck_require__(74687), exports);
tslib_1.__exportStar(__nccwpck_require__(89728), exports);
tslib_1.__exportStar(__nccwpck_require__(89151), exports);
tslib_1.__exportStar(__nccwpck_require__(8786), exports);
tslib_1.__exportStar(__nccwpck_require__(11453), exports);
tslib_1.__exportStar(__nccwpck_require__(98064), exports);
tslib_1.__exportStar(__nccwpck_require__(25083), exports);
tslib_1.__exportStar(__nccwpck_require__(30639), exports);
tslib_1.__exportStar(__nccwpck_require__(5950), exports);
tslib_1.__exportStar(__nccwpck_require__(18291), exports);
tslib_1.__exportStar(__nccwpck_require__(83162), exports);
tslib_1.__exportStar(__nccwpck_require__(10150), exports);
tslib_1.__exportStar(__nccwpck_require__(29521), exports);
tslib_1.__exportStar(__nccwpck_require__(53209), exports);
tslib_1.__exportStar(__nccwpck_require__(69602), exports);
tslib_1.__exportStar(__nccwpck_require__(85029), exports);
tslib_1.__exportStar(__nccwpck_require__(75145), exports);
tslib_1.__exportStar(__nccwpck_require__(12390), exports);
tslib_1.__exportStar(__nccwpck_require__(34096), exports);
tslib_1.__exportStar(__nccwpck_require__(33665), exports);
tslib_1.__exportStar(__nccwpck_require__(96952), exports);
tslib_1.__exportStar(__nccwpck_require__(41473), exports);
tslib_1.__exportStar(__nccwpck_require__(67231), exports);
tslib_1.__exportStar(__nccwpck_require__(46788), exports);
tslib_1.__exportStar(__nccwpck_require__(17298), exports);
tslib_1.__exportStar(__nccwpck_require__(60715), exports);
tslib_1.__exportStar(__nccwpck_require__(73280), exports);
tslib_1.__exportStar(__nccwpck_require__(54941), exports);
tslib_1.__exportStar(__nccwpck_require__(5415), exports);
tslib_1.__exportStar(__nccwpck_require__(17383), exports);
tslib_1.__exportStar(__nccwpck_require__(61416), exports);
tslib_1.__exportStar(__nccwpck_require__(56126), exports);
tslib_1.__exportStar(__nccwpck_require__(60958), exports);
tslib_1.__exportStar(__nccwpck_require__(46865), exports);
tslib_1.__exportStar(__nccwpck_require__(78411), exports);
tslib_1.__exportStar(__nccwpck_require__(23137), exports);
tslib_1.__exportStar(__nccwpck_require__(849), exports);
tslib_1.__exportStar(__nccwpck_require__(17451), exports);
const admissionregistrationV1ServiceReference_1 = __nccwpck_require__(21616);
const admissionregistrationV1WebhookClientConfig_1 = __nccwpck_require__(7818);
const apiextensionsV1ServiceReference_1 = __nccwpck_require__(63536);
const apiextensionsV1WebhookClientConfig_1 = __nccwpck_require__(22775);
const apiregistrationV1ServiceReference_1 = __nccwpck_require__(37492);
const authenticationV1TokenRequest_1 = __nccwpck_require__(25429);
const coreV1EndpointPort_1 = __nccwpck_require__(81950);
const coreV1Event_1 = __nccwpck_require__(42735);
const coreV1EventList_1 = __nccwpck_require__(12368);
const coreV1EventSeries_1 = __nccwpck_require__(70438);
const discoveryV1EndpointPort_1 = __nccwpck_require__(75853);
const eventsV1Event_1 = __nccwpck_require__(52191);
const eventsV1EventList_1 = __nccwpck_require__(1051);
const eventsV1EventSeries_1 = __nccwpck_require__(6933);
const storageV1TokenRequest_1 = __nccwpck_require__(25958);
const v1APIGroup_1 = __nccwpck_require__(44481);
const v1APIGroupList_1 = __nccwpck_require__(52906);
const v1APIResource_1 = __nccwpck_require__(89033);
const v1APIResourceList_1 = __nccwpck_require__(5454);
const v1APIService_1 = __nccwpck_require__(99042);
const v1APIServiceCondition_1 = __nccwpck_require__(58352);
const v1APIServiceList_1 = __nccwpck_require__(87198);
const v1APIServiceSpec_1 = __nccwpck_require__(61496);
const v1APIServiceStatus_1 = __nccwpck_require__(17883);
const v1APIVersions_1 = __nccwpck_require__(93135);
const v1AWSElasticBlockStoreVolumeSource_1 = __nccwpck_require__(39808);
const v1Affinity_1 = __nccwpck_require__(61957);
const v1AggregationRule_1 = __nccwpck_require__(90312);
const v1AttachedVolume_1 = __nccwpck_require__(97069);
const v1AzureDiskVolumeSource_1 = __nccwpck_require__(91312);
const v1AzureFilePersistentVolumeSource_1 = __nccwpck_require__(6336);
const v1AzureFileVolumeSource_1 = __nccwpck_require__(95073);
const v1Binding_1 = __nccwpck_require__(48551);
const v1BoundObjectReference_1 = __nccwpck_require__(68849);
const v1CSIDriver_1 = __nccwpck_require__(34144);
const v1CSIDriverList_1 = __nccwpck_require__(84881);
const v1CSIDriverSpec_1 = __nccwpck_require__(11582);
const v1CSINode_1 = __nccwpck_require__(74315);
const v1CSINodeDriver_1 = __nccwpck_require__(90288);
const v1CSINodeList_1 = __nccwpck_require__(24000);
const v1CSINodeSpec_1 = __nccwpck_require__(75636);
const v1CSIPersistentVolumeSource_1 = __nccwpck_require__(98367);
const v1CSIVolumeSource_1 = __nccwpck_require__(87598);
const v1Capabilities_1 = __nccwpck_require__(82975);
const v1CephFSPersistentVolumeSource_1 = __nccwpck_require__(14268);
const v1CephFSVolumeSource_1 = __nccwpck_require__(84957);
const v1CertificateSigningRequest_1 = __nccwpck_require__(99084);
const v1CertificateSigningRequestCondition_1 = __nccwpck_require__(92932);
const v1CertificateSigningRequestList_1 = __nccwpck_require__(31530);
const v1CertificateSigningRequestSpec_1 = __nccwpck_require__(37759);
const v1CertificateSigningRequestStatus_1 = __nccwpck_require__(38285);
const v1CinderPersistentVolumeSource_1 = __nccwpck_require__(41888);
const v1CinderVolumeSource_1 = __nccwpck_require__(19111);
const v1ClientIPConfig_1 = __nccwpck_require__(33913);
const v1ClusterRole_1 = __nccwpck_require__(61458);
const v1ClusterRoleBinding_1 = __nccwpck_require__(32315);
const v1ClusterRoleBindingList_1 = __nccwpck_require__(21181);
const v1ClusterRoleList_1 = __nccwpck_require__(95532);
const v1ComponentCondition_1 = __nccwpck_require__(30578);
const v1ComponentStatus_1 = __nccwpck_require__(2047);
const v1ComponentStatusList_1 = __nccwpck_require__(38596);
const v1Condition_1 = __nccwpck_require__(34990);
const v1ConfigMap_1 = __nccwpck_require__(42874);
const v1ConfigMapEnvSource_1 = __nccwpck_require__(99685);
const v1ConfigMapKeySelector_1 = __nccwpck_require__(62892);
const v1ConfigMapList_1 = __nccwpck_require__(80512);
const v1ConfigMapNodeConfigSource_1 = __nccwpck_require__(56709);
const v1ConfigMapProjection_1 = __nccwpck_require__(61682);
const v1ConfigMapVolumeSource_1 = __nccwpck_require__(59708);
const v1Container_1 = __nccwpck_require__(52865);
const v1ContainerImage_1 = __nccwpck_require__(13501);
const v1ContainerPort_1 = __nccwpck_require__(50217);
const v1ContainerState_1 = __nccwpck_require__(83765);
const v1ContainerStateRunning_1 = __nccwpck_require__(89767);
const v1ContainerStateTerminated_1 = __nccwpck_require__(27892);
const v1ContainerStateWaiting_1 = __nccwpck_require__(19716);
const v1ContainerStatus_1 = __nccwpck_require__(35980);
const v1ControllerRevision_1 = __nccwpck_require__(78405);
const v1ControllerRevisionList_1 = __nccwpck_require__(66304);
const v1CronJob_1 = __nccwpck_require__(54382);
const v1CronJobList_1 = __nccwpck_require__(72565);
const v1CronJobSpec_1 = __nccwpck_require__(7011);
const v1CronJobStatus_1 = __nccwpck_require__(24600);
const v1CrossVersionObjectReference_1 = __nccwpck_require__(34233);
const v1CustomResourceColumnDefinition_1 = __nccwpck_require__(94346);
const v1CustomResourceConversion_1 = __nccwpck_require__(9731);
const v1CustomResourceDefinition_1 = __nccwpck_require__(40325);
const v1CustomResourceDefinitionCondition_1 = __nccwpck_require__(32791);
const v1CustomResourceDefinitionList_1 = __nccwpck_require__(10486);
const v1CustomResourceDefinitionNames_1 = __nccwpck_require__(69798);
const v1CustomResourceDefinitionSpec_1 = __nccwpck_require__(20486);
const v1CustomResourceDefinitionStatus_1 = __nccwpck_require__(25713);
const v1CustomResourceDefinitionVersion_1 = __nccwpck_require__(82283);
const v1CustomResourceSubresourceScale_1 = __nccwpck_require__(98087);
const v1CustomResourceSubresources_1 = __nccwpck_require__(94579);
const v1CustomResourceValidation_1 = __nccwpck_require__(25408);
const v1DaemonEndpoint_1 = __nccwpck_require__(37060);
const v1DaemonSet_1 = __nccwpck_require__(32699);
const v1DaemonSetCondition_1 = __nccwpck_require__(77063);
const v1DaemonSetList_1 = __nccwpck_require__(173);
const v1DaemonSetSpec_1 = __nccwpck_require__(44560);
const v1DaemonSetStatus_1 = __nccwpck_require__(80195);
const v1DaemonSetUpdateStrategy_1 = __nccwpck_require__(48451);
const v1DeleteOptions_1 = __nccwpck_require__(18029);
const v1Deployment_1 = __nccwpck_require__(65310);
const v1DeploymentCondition_1 = __nccwpck_require__(95602);
const v1DeploymentList_1 = __nccwpck_require__(81364);
const v1DeploymentSpec_1 = __nccwpck_require__(41298);
const v1DeploymentStatus_1 = __nccwpck_require__(55398);
const v1DeploymentStrategy_1 = __nccwpck_require__(34981);
const v1DownwardAPIProjection_1 = __nccwpck_require__(38099);
const v1DownwardAPIVolumeFile_1 = __nccwpck_require__(78901);
const v1DownwardAPIVolumeSource_1 = __nccwpck_require__(19493);
const v1EmptyDirVolumeSource_1 = __nccwpck_require__(11672);
const v1Endpoint_1 = __nccwpck_require__(17252);
const v1EndpointAddress_1 = __nccwpck_require__(57151);
const v1EndpointConditions_1 = __nccwpck_require__(70435);
const v1EndpointHints_1 = __nccwpck_require__(97000);
const v1EndpointSlice_1 = __nccwpck_require__(53708);
const v1EndpointSliceList_1 = __nccwpck_require__(6223);
const v1EndpointSubset_1 = __nccwpck_require__(31925);
const v1Endpoints_1 = __nccwpck_require__(13449);
const v1EndpointsList_1 = __nccwpck_require__(95223);
const v1EnvFromSource_1 = __nccwpck_require__(23074);
const v1EnvVar_1 = __nccwpck_require__(36874);
const v1EnvVarSource_1 = __nccwpck_require__(17205);
const v1EphemeralContainer_1 = __nccwpck_require__(32671);
const v1EphemeralVolumeSource_1 = __nccwpck_require__(90017);
const v1EventSource_1 = __nccwpck_require__(97764);
const v1Eviction_1 = __nccwpck_require__(87969);
const v1ExecAction_1 = __nccwpck_require__(13313);
const v1ExternalDocumentation_1 = __nccwpck_require__(77213);
const v1FCVolumeSource_1 = __nccwpck_require__(35093);
const v1FlexPersistentVolumeSource_1 = __nccwpck_require__(91874);
const v1FlexVolumeSource_1 = __nccwpck_require__(16690);
const v1FlockerVolumeSource_1 = __nccwpck_require__(10414);
const v1ForZone_1 = __nccwpck_require__(3439);
const v1GCEPersistentDiskVolumeSource_1 = __nccwpck_require__(1016);
const v1GitRepoVolumeSource_1 = __nccwpck_require__(27584);
const v1GlusterfsPersistentVolumeSource_1 = __nccwpck_require__(97617);
const v1GlusterfsVolumeSource_1 = __nccwpck_require__(37426);
const v1GroupVersionForDiscovery_1 = __nccwpck_require__(87855);
const v1HTTPGetAction_1 = __nccwpck_require__(16636);
const v1HTTPHeader_1 = __nccwpck_require__(3437);
const v1HTTPIngressPath_1 = __nccwpck_require__(86769);
const v1HTTPIngressRuleValue_1 = __nccwpck_require__(56219);
const v1Handler_1 = __nccwpck_require__(95179);
const v1HorizontalPodAutoscaler_1 = __nccwpck_require__(93652);
const v1HorizontalPodAutoscalerList_1 = __nccwpck_require__(17024);
const v1HorizontalPodAutoscalerSpec_1 = __nccwpck_require__(49823);
const v1HorizontalPodAutoscalerStatus_1 = __nccwpck_require__(50910);
const v1HostAlias_1 = __nccwpck_require__(72796);
const v1HostPathVolumeSource_1 = __nccwpck_require__(69225);
const v1IPBlock_1 = __nccwpck_require__(49202);
const v1ISCSIPersistentVolumeSource_1 = __nccwpck_require__(83570);
const v1ISCSIVolumeSource_1 = __nccwpck_require__(68021);
const v1Ingress_1 = __nccwpck_require__(32492);
const v1IngressBackend_1 = __nccwpck_require__(44340);
const v1IngressClass_1 = __nccwpck_require__(93865);
const v1IngressClassList_1 = __nccwpck_require__(76125);
const v1IngressClassParametersReference_1 = __nccwpck_require__(76672);
const v1IngressClassSpec_1 = __nccwpck_require__(92069);
const v1IngressList_1 = __nccwpck_require__(43693);
const v1IngressRule_1 = __nccwpck_require__(89541);
const v1IngressServiceBackend_1 = __nccwpck_require__(62476);
const v1IngressSpec_1 = __nccwpck_require__(59689);
const v1IngressStatus_1 = __nccwpck_require__(45830);
const v1IngressTLS_1 = __nccwpck_require__(23037);
const v1JSONSchemaProps_1 = __nccwpck_require__(63580);
const v1Job_1 = __nccwpck_require__(91260);
const v1JobCondition_1 = __nccwpck_require__(94069);
const v1JobList_1 = __nccwpck_require__(75711);
const v1JobSpec_1 = __nccwpck_require__(93114);
const v1JobStatus_1 = __nccwpck_require__(57345);
const v1JobTemplateSpec_1 = __nccwpck_require__(96227);
const v1KeyToPath_1 = __nccwpck_require__(23549);
const v1LabelSelector_1 = __nccwpck_require__(22567);
const v1LabelSelectorRequirement_1 = __nccwpck_require__(50993);
const v1Lease_1 = __nccwpck_require__(98844);
const v1LeaseList_1 = __nccwpck_require__(76838);
const v1LeaseSpec_1 = __nccwpck_require__(79083);
const v1Lifecycle_1 = __nccwpck_require__(41500);
const v1LimitRange_1 = __nccwpck_require__(86280);
const v1LimitRangeItem_1 = __nccwpck_require__(91128);
const v1LimitRangeList_1 = __nccwpck_require__(82578);
const v1LimitRangeSpec_1 = __nccwpck_require__(83039);
const v1ListMeta_1 = __nccwpck_require__(88593);
const v1LoadBalancerIngress_1 = __nccwpck_require__(25667);
const v1LoadBalancerStatus_1 = __nccwpck_require__(46630);
const v1LocalObjectReference_1 = __nccwpck_require__(12229);
const v1LocalSubjectAccessReview_1 = __nccwpck_require__(31674);
const v1LocalVolumeSource_1 = __nccwpck_require__(72729);
const v1ManagedFieldsEntry_1 = __nccwpck_require__(82187);
const v1MutatingWebhook_1 = __nccwpck_require__(95354);
const v1MutatingWebhookConfiguration_1 = __nccwpck_require__(2006);
const v1MutatingWebhookConfigurationList_1 = __nccwpck_require__(22665);
const v1NFSVolumeSource_1 = __nccwpck_require__(35432);
const v1Namespace_1 = __nccwpck_require__(95469);
const v1NamespaceCondition_1 = __nccwpck_require__(314);
const v1NamespaceList_1 = __nccwpck_require__(22366);
const v1NamespaceSpec_1 = __nccwpck_require__(49076);
const v1NamespaceStatus_1 = __nccwpck_require__(8833);
const v1NetworkPolicy_1 = __nccwpck_require__(47995);
const v1NetworkPolicyEgressRule_1 = __nccwpck_require__(60886);
const v1NetworkPolicyIngressRule_1 = __nccwpck_require__(89952);
const v1NetworkPolicyList_1 = __nccwpck_require__(74436);
const v1NetworkPolicyPeer_1 = __nccwpck_require__(22173);
const v1NetworkPolicyPort_1 = __nccwpck_require__(71056);
const v1NetworkPolicySpec_1 = __nccwpck_require__(63061);
const v1Node_1 = __nccwpck_require__(3667);
const v1NodeAddress_1 = __nccwpck_require__(47532);
const v1NodeAffinity_1 = __nccwpck_require__(10627);
const v1NodeCondition_1 = __nccwpck_require__(11740);
const v1NodeConfigSource_1 = __nccwpck_require__(4272);
const v1NodeConfigStatus_1 = __nccwpck_require__(10912);
const v1NodeDaemonEndpoints_1 = __nccwpck_require__(24894);
const v1NodeList_1 = __nccwpck_require__(42762);
const v1NodeSelector_1 = __nccwpck_require__(32293);
const v1NodeSelectorRequirement_1 = __nccwpck_require__(85161);
const v1NodeSelectorTerm_1 = __nccwpck_require__(51128);
const v1NodeSpec_1 = __nccwpck_require__(41752);
const v1NodeStatus_1 = __nccwpck_require__(21656);
const v1NodeSystemInfo_1 = __nccwpck_require__(33645);
const v1NonResourceAttributes_1 = __nccwpck_require__(70019);
const v1NonResourceRule_1 = __nccwpck_require__(99191);
const v1ObjectFieldSelector_1 = __nccwpck_require__(86171);
const v1ObjectMeta_1 = __nccwpck_require__(44696);
const v1ObjectReference_1 = __nccwpck_require__(19051);
const v1Overhead_1 = __nccwpck_require__(90114);
const v1OwnerReference_1 = __nccwpck_require__(7924);
const v1PersistentVolume_1 = __nccwpck_require__(25570);
const v1PersistentVolumeClaim_1 = __nccwpck_require__(89974);
const v1PersistentVolumeClaimCondition_1 = __nccwpck_require__(32966);
const v1PersistentVolumeClaimList_1 = __nccwpck_require__(78594);
const v1PersistentVolumeClaimSpec_1 = __nccwpck_require__(99911);
const v1PersistentVolumeClaimStatus_1 = __nccwpck_require__(42951);
const v1PersistentVolumeClaimTemplate_1 = __nccwpck_require__(92114);
const v1PersistentVolumeClaimVolumeSource_1 = __nccwpck_require__(69811);
const v1PersistentVolumeList_1 = __nccwpck_require__(86312);
const v1PersistentVolumeSpec_1 = __nccwpck_require__(86628);
const v1PersistentVolumeStatus_1 = __nccwpck_require__(19839);
const v1PhotonPersistentDiskVolumeSource_1 = __nccwpck_require__(51817);
const v1Pod_1 = __nccwpck_require__(99975);
const v1PodAffinity_1 = __nccwpck_require__(509);
const v1PodAffinityTerm_1 = __nccwpck_require__(65970);
const v1PodAntiAffinity_1 = __nccwpck_require__(19574);
const v1PodCondition_1 = __nccwpck_require__(78045);
const v1PodDNSConfig_1 = __nccwpck_require__(67831);
const v1PodDNSConfigOption_1 = __nccwpck_require__(74548);
const v1PodDisruptionBudget_1 = __nccwpck_require__(61215);
const v1PodDisruptionBudgetList_1 = __nccwpck_require__(67829);
const v1PodDisruptionBudgetSpec_1 = __nccwpck_require__(39899);
const v1PodDisruptionBudgetStatus_1 = __nccwpck_require__(22547);
const v1PodIP_1 = __nccwpck_require__(76774);
const v1PodList_1 = __nccwpck_require__(71948);
const v1PodReadinessGate_1 = __nccwpck_require__(84135);
const v1PodSecurityContext_1 = __nccwpck_require__(79850);
const v1PodSpec_1 = __nccwpck_require__(58881);
const v1PodStatus_1 = __nccwpck_require__(42892);
const v1PodTemplate_1 = __nccwpck_require__(39894);
const v1PodTemplateList_1 = __nccwpck_require__(88279);
const v1PodTemplateSpec_1 = __nccwpck_require__(97621);
const v1PolicyRule_1 = __nccwpck_require__(74625);
const v1PortStatus_1 = __nccwpck_require__(85571);
const v1PortworxVolumeSource_1 = __nccwpck_require__(3317);
const v1Preconditions_1 = __nccwpck_require__(85751);
const v1PreferredSchedulingTerm_1 = __nccwpck_require__(50837);
const v1PriorityClass_1 = __nccwpck_require__(35698);
const v1PriorityClassList_1 = __nccwpck_require__(80966);
const v1Probe_1 = __nccwpck_require__(43933);
const v1ProjectedVolumeSource_1 = __nccwpck_require__(54662);
const v1QuobyteVolumeSource_1 = __nccwpck_require__(16954);
const v1RBDPersistentVolumeSource_1 = __nccwpck_require__(70634);
const v1RBDVolumeSource_1 = __nccwpck_require__(26573);
const v1ReplicaSet_1 = __nccwpck_require__(69009);
const v1ReplicaSetCondition_1 = __nccwpck_require__(14870);
const v1ReplicaSetList_1 = __nccwpck_require__(40475);
const v1ReplicaSetSpec_1 = __nccwpck_require__(90975);
const v1ReplicaSetStatus_1 = __nccwpck_require__(66859);
const v1ReplicationController_1 = __nccwpck_require__(64888);
const v1ReplicationControllerCondition_1 = __nccwpck_require__(36376);
const v1ReplicationControllerList_1 = __nccwpck_require__(8350);
const v1ReplicationControllerSpec_1 = __nccwpck_require__(21782);
const v1ReplicationControllerStatus_1 = __nccwpck_require__(19870);
const v1ResourceAttributes_1 = __nccwpck_require__(94221);
const v1ResourceFieldSelector_1 = __nccwpck_require__(10936);
const v1ResourceQuota_1 = __nccwpck_require__(5827);
const v1ResourceQuotaList_1 = __nccwpck_require__(48994);
const v1ResourceQuotaSpec_1 = __nccwpck_require__(55397);
const v1ResourceQuotaStatus_1 = __nccwpck_require__(91686);
const v1ResourceRequirements_1 = __nccwpck_require__(22421);
const v1ResourceRule_1 = __nccwpck_require__(1581);
const v1Role_1 = __nccwpck_require__(61114);
const v1RoleBinding_1 = __nccwpck_require__(77568);
const v1RoleBindingList_1 = __nccwpck_require__(55014);
const v1RoleList_1 = __nccwpck_require__(67214);
const v1RoleRef_1 = __nccwpck_require__(56149);
const v1RollingUpdateDaemonSet_1 = __nccwpck_require__(46136);
const v1RollingUpdateDeployment_1 = __nccwpck_require__(70215);
const v1RollingUpdateStatefulSetStrategy_1 = __nccwpck_require__(37088);
const v1RuleWithOperations_1 = __nccwpck_require__(1824);
const v1RuntimeClass_1 = __nccwpck_require__(31828);
const v1RuntimeClassList_1 = __nccwpck_require__(96736);
const v1SELinuxOptions_1 = __nccwpck_require__(99411);
const v1Scale_1 = __nccwpck_require__(9764);
const v1ScaleIOPersistentVolumeSource_1 = __nccwpck_require__(21058);
const v1ScaleIOVolumeSource_1 = __nccwpck_require__(31382);
const v1ScaleSpec_1 = __nccwpck_require__(15895);
const v1ScaleStatus_1 = __nccwpck_require__(56891);
const v1Scheduling_1 = __nccwpck_require__(79991);
const v1ScopeSelector_1 = __nccwpck_require__(60711);
const v1ScopedResourceSelectorRequirement_1 = __nccwpck_require__(25888);
const v1SeccompProfile_1 = __nccwpck_require__(845);
const v1Secret_1 = __nccwpck_require__(49696);
const v1SecretEnvSource_1 = __nccwpck_require__(7056);
const v1SecretKeySelector_1 = __nccwpck_require__(3884);
const v1SecretList_1 = __nccwpck_require__(4248);
const v1SecretProjection_1 = __nccwpck_require__(39203);
const v1SecretReference_1 = __nccwpck_require__(33725);
const v1SecretVolumeSource_1 = __nccwpck_require__(19078);
const v1SecurityContext_1 = __nccwpck_require__(98113);
const v1SelfSubjectAccessReview_1 = __nccwpck_require__(15598);
const v1SelfSubjectAccessReviewSpec_1 = __nccwpck_require__(39191);
const v1SelfSubjectRulesReview_1 = __nccwpck_require__(84279);
const v1SelfSubjectRulesReviewSpec_1 = __nccwpck_require__(56581);
const v1ServerAddressByClientCIDR_1 = __nccwpck_require__(30254);
const v1Service_1 = __nccwpck_require__(87928);
const v1ServiceAccount_1 = __nccwpck_require__(9350);
const v1ServiceAccountList_1 = __nccwpck_require__(38169);
const v1ServiceAccountTokenProjection_1 = __nccwpck_require__(18640);
const v1ServiceBackendPort_1 = __nccwpck_require__(25927);
const v1ServiceList_1 = __nccwpck_require__(26839);
const v1ServicePort_1 = __nccwpck_require__(46881);
const v1ServiceSpec_1 = __nccwpck_require__(96339);
const v1ServiceStatus_1 = __nccwpck_require__(62890);
const v1SessionAffinityConfig_1 = __nccwpck_require__(69127);
const v1StatefulSet_1 = __nccwpck_require__(76275);
const v1StatefulSetCondition_1 = __nccwpck_require__(49545);
const v1StatefulSetList_1 = __nccwpck_require__(9927);
const v1StatefulSetSpec_1 = __nccwpck_require__(18622);
const v1StatefulSetStatus_1 = __nccwpck_require__(95926);
const v1StatefulSetUpdateStrategy_1 = __nccwpck_require__(48971);
const v1Status_1 = __nccwpck_require__(31592);
const v1StatusCause_1 = __nccwpck_require__(83459);
const v1StatusDetails_1 = __nccwpck_require__(9077);
const v1StorageClass_1 = __nccwpck_require__(70127);
const v1StorageClassList_1 = __nccwpck_require__(53615);
const v1StorageOSPersistentVolumeSource_1 = __nccwpck_require__(14610);
const v1StorageOSVolumeSource_1 = __nccwpck_require__(60878);
const v1Subject_1 = __nccwpck_require__(1655);
const v1SubjectAccessReview_1 = __nccwpck_require__(87717);
const v1SubjectAccessReviewSpec_1 = __nccwpck_require__(34417);
const v1SubjectAccessReviewStatus_1 = __nccwpck_require__(62967);
const v1SubjectRulesReviewStatus_1 = __nccwpck_require__(41434);
const v1Sysctl_1 = __nccwpck_require__(55885);
const v1TCPSocketAction_1 = __nccwpck_require__(20317);
const v1Taint_1 = __nccwpck_require__(65055);
const v1TokenRequestSpec_1 = __nccwpck_require__(46022);
const v1TokenRequestStatus_1 = __nccwpck_require__(38664);
const v1TokenReview_1 = __nccwpck_require__(93238);
const v1TokenReviewSpec_1 = __nccwpck_require__(6538);
const v1TokenReviewStatus_1 = __nccwpck_require__(94719);
const v1Toleration_1 = __nccwpck_require__(26379);
const v1TopologySelectorLabelRequirement_1 = __nccwpck_require__(14361);
const v1TopologySelectorTerm_1 = __nccwpck_require__(86872);
const v1TopologySpreadConstraint_1 = __nccwpck_require__(89521);
const v1TypedLocalObjectReference_1 = __nccwpck_require__(6602);
const v1UncountedTerminatedPods_1 = __nccwpck_require__(95702);
const v1UserInfo_1 = __nccwpck_require__(75476);
const v1ValidatingWebhook_1 = __nccwpck_require__(67027);
const v1ValidatingWebhookConfiguration_1 = __nccwpck_require__(98205);
const v1ValidatingWebhookConfigurationList_1 = __nccwpck_require__(3099);
const v1Volume_1 = __nccwpck_require__(61999);
const v1VolumeAttachment_1 = __nccwpck_require__(96086);
const v1VolumeAttachmentList_1 = __nccwpck_require__(50793);
const v1VolumeAttachmentSource_1 = __nccwpck_require__(81906);
const v1VolumeAttachmentSpec_1 = __nccwpck_require__(92848);
const v1VolumeAttachmentStatus_1 = __nccwpck_require__(69489);
const v1VolumeDevice_1 = __nccwpck_require__(12040);
const v1VolumeError_1 = __nccwpck_require__(67225);
const v1VolumeMount_1 = __nccwpck_require__(6290);
const v1VolumeNodeAffinity_1 = __nccwpck_require__(33698);
const v1VolumeNodeResources_1 = __nccwpck_require__(3991);
const v1VolumeProjection_1 = __nccwpck_require__(59985);
const v1VsphereVirtualDiskVolumeSource_1 = __nccwpck_require__(52589);
const v1WatchEvent_1 = __nccwpck_require__(67377);
const v1WebhookConversion_1 = __nccwpck_require__(5757);
const v1WeightedPodAffinityTerm_1 = __nccwpck_require__(49592);
const v1WindowsSecurityContextOptions_1 = __nccwpck_require__(35568);
const v1alpha1AggregationRule_1 = __nccwpck_require__(5287);
const v1alpha1CSIStorageCapacity_1 = __nccwpck_require__(76193);
const v1alpha1CSIStorageCapacityList_1 = __nccwpck_require__(29380);
const v1alpha1ClusterRole_1 = __nccwpck_require__(33927);
const v1alpha1ClusterRoleBinding_1 = __nccwpck_require__(65276);
const v1alpha1ClusterRoleBindingList_1 = __nccwpck_require__(83787);
const v1alpha1ClusterRoleList_1 = __nccwpck_require__(90989);
const v1alpha1Overhead_1 = __nccwpck_require__(8070);
const v1alpha1PolicyRule_1 = __nccwpck_require__(61014);
const v1alpha1PriorityClass_1 = __nccwpck_require__(89642);
const v1alpha1PriorityClassList_1 = __nccwpck_require__(15220);
const v1alpha1Role_1 = __nccwpck_require__(45910);
const v1alpha1RoleBinding_1 = __nccwpck_require__(32036);
const v1alpha1RoleBindingList_1 = __nccwpck_require__(53079);
const v1alpha1RoleList_1 = __nccwpck_require__(39479);
const v1alpha1RoleRef_1 = __nccwpck_require__(56871);
const v1alpha1RuntimeClass_1 = __nccwpck_require__(66602);
const v1alpha1RuntimeClassList_1 = __nccwpck_require__(41934);
const v1alpha1RuntimeClassSpec_1 = __nccwpck_require__(3593);
const v1alpha1Scheduling_1 = __nccwpck_require__(12511);
const v1alpha1ServerStorageVersion_1 = __nccwpck_require__(47647);
const v1alpha1StorageVersion_1 = __nccwpck_require__(54349);
const v1alpha1StorageVersionCondition_1 = __nccwpck_require__(20058);
const v1alpha1StorageVersionList_1 = __nccwpck_require__(53792);
const v1alpha1StorageVersionStatus_1 = __nccwpck_require__(20970);
const v1alpha1Subject_1 = __nccwpck_require__(69903);
const v1alpha1VolumeAttachment_1 = __nccwpck_require__(88392);
const v1alpha1VolumeAttachmentList_1 = __nccwpck_require__(49929);
const v1alpha1VolumeAttachmentSource_1 = __nccwpck_require__(23402);
const v1alpha1VolumeAttachmentSpec_1 = __nccwpck_require__(49584);
const v1alpha1VolumeAttachmentStatus_1 = __nccwpck_require__(94030);
const v1alpha1VolumeError_1 = __nccwpck_require__(39991);
const v1beta1AllowedCSIDriver_1 = __nccwpck_require__(7724);
const v1beta1AllowedFlexVolume_1 = __nccwpck_require__(66666);
const v1beta1AllowedHostPath_1 = __nccwpck_require__(29863);
const v1beta1CSIStorageCapacity_1 = __nccwpck_require__(30594);
const v1beta1CSIStorageCapacityList_1 = __nccwpck_require__(1496);
const v1beta1CronJob_1 = __nccwpck_require__(21270);
const v1beta1CronJobList_1 = __nccwpck_require__(9165);
const v1beta1CronJobSpec_1 = __nccwpck_require__(64672);
const v1beta1CronJobStatus_1 = __nccwpck_require__(60049);
const v1beta1Endpoint_1 = __nccwpck_require__(61730);
const v1beta1EndpointConditions_1 = __nccwpck_require__(37085);
const v1beta1EndpointHints_1 = __nccwpck_require__(35081);
const v1beta1EndpointPort_1 = __nccwpck_require__(7423);
const v1beta1EndpointSlice_1 = __nccwpck_require__(26777);
const v1beta1EndpointSliceList_1 = __nccwpck_require__(98830);
const v1beta1Event_1 = __nccwpck_require__(93967);
const v1beta1EventList_1 = __nccwpck_require__(64484);
const v1beta1EventSeries_1 = __nccwpck_require__(63533);
const v1beta1FSGroupStrategyOptions_1 = __nccwpck_require__(57091);
const v1beta1FlowDistinguisherMethod_1 = __nccwpck_require__(98441);
const v1beta1FlowSchema_1 = __nccwpck_require__(30089);
const v1beta1FlowSchemaCondition_1 = __nccwpck_require__(43801);
const v1beta1FlowSchemaList_1 = __nccwpck_require__(58382);
const v1beta1FlowSchemaSpec_1 = __nccwpck_require__(84478);
const v1beta1FlowSchemaStatus_1 = __nccwpck_require__(8076);
const v1beta1ForZone_1 = __nccwpck_require__(53942);
const v1beta1GroupSubject_1 = __nccwpck_require__(51807);
const v1beta1HostPortRange_1 = __nccwpck_require__(59514);
const v1beta1IDRange_1 = __nccwpck_require__(96831);
const v1beta1JobTemplateSpec_1 = __nccwpck_require__(75855);
const v1beta1LimitResponse_1 = __nccwpck_require__(8326);
const v1beta1LimitedPriorityLevelConfiguration_1 = __nccwpck_require__(40541);
const v1beta1NonResourcePolicyRule_1 = __nccwpck_require__(81655);
const v1beta1Overhead_1 = __nccwpck_require__(34396);
const v1beta1PodDisruptionBudget_1 = __nccwpck_require__(43485);
const v1beta1PodDisruptionBudgetList_1 = __nccwpck_require__(63931);
const v1beta1PodDisruptionBudgetSpec_1 = __nccwpck_require__(23257);
const v1beta1PodDisruptionBudgetStatus_1 = __nccwpck_require__(84404);
const v1beta1PodSecurityPolicy_1 = __nccwpck_require__(44289);
const v1beta1PodSecurityPolicyList_1 = __nccwpck_require__(90147);
const v1beta1PodSecurityPolicySpec_1 = __nccwpck_require__(72683);
const v1beta1PolicyRulesWithSubjects_1 = __nccwpck_require__(75714);
const v1beta1PriorityLevelConfiguration_1 = __nccwpck_require__(67813);
const v1beta1PriorityLevelConfigurationCondition_1 = __nccwpck_require__(60270);
const v1beta1PriorityLevelConfigurationList_1 = __nccwpck_require__(90435);
const v1beta1PriorityLevelConfigurationReference_1 = __nccwpck_require__(42319);
const v1beta1PriorityLevelConfigurationSpec_1 = __nccwpck_require__(10530);
const v1beta1PriorityLevelConfigurationStatus_1 = __nccwpck_require__(22546);
const v1beta1QueuingConfiguration_1 = __nccwpck_require__(62252);
const v1beta1ResourcePolicyRule_1 = __nccwpck_require__(5461);
const v1beta1RunAsGroupStrategyOptions_1 = __nccwpck_require__(65831);
const v1beta1RunAsUserStrategyOptions_1 = __nccwpck_require__(31079);
const v1beta1RuntimeClass_1 = __nccwpck_require__(75281);
const v1beta1RuntimeClassList_1 = __nccwpck_require__(8109);
const v1beta1RuntimeClassStrategyOptions_1 = __nccwpck_require__(50769);
const v1beta1SELinuxStrategyOptions_1 = __nccwpck_require__(49098);
const v1beta1Scheduling_1 = __nccwpck_require__(34651);
const v1beta1ServiceAccountSubject_1 = __nccwpck_require__(473);
const v1beta1Subject_1 = __nccwpck_require__(44509);
const v1beta1SupplementalGroupsStrategyOptions_1 = __nccwpck_require__(12802);
const v1beta1UserSubject_1 = __nccwpck_require__(11202);
const v2beta1ContainerResourceMetricSource_1 = __nccwpck_require__(37196);
const v2beta1ContainerResourceMetricStatus_1 = __nccwpck_require__(27287);
const v2beta1CrossVersionObjectReference_1 = __nccwpck_require__(36502);
const v2beta1ExternalMetricSource_1 = __nccwpck_require__(43128);
const v2beta1ExternalMetricStatus_1 = __nccwpck_require__(96606);
const v2beta1HorizontalPodAutoscaler_1 = __nccwpck_require__(74687);
const v2beta1HorizontalPodAutoscalerCondition_1 = __nccwpck_require__(89728);
const v2beta1HorizontalPodAutoscalerList_1 = __nccwpck_require__(89151);
const v2beta1HorizontalPodAutoscalerSpec_1 = __nccwpck_require__(8786);
const v2beta1HorizontalPodAutoscalerStatus_1 = __nccwpck_require__(11453);
const v2beta1MetricSpec_1 = __nccwpck_require__(98064);
const v2beta1MetricStatus_1 = __nccwpck_require__(25083);
const v2beta1ObjectMetricSource_1 = __nccwpck_require__(30639);
const v2beta1ObjectMetricStatus_1 = __nccwpck_require__(5950);
const v2beta1PodsMetricSource_1 = __nccwpck_require__(18291);
const v2beta1PodsMetricStatus_1 = __nccwpck_require__(83162);
const v2beta1ResourceMetricSource_1 = __nccwpck_require__(10150);
const v2beta1ResourceMetricStatus_1 = __nccwpck_require__(29521);
const v2beta2ContainerResourceMetricSource_1 = __nccwpck_require__(53209);
const v2beta2ContainerResourceMetricStatus_1 = __nccwpck_require__(69602);
const v2beta2CrossVersionObjectReference_1 = __nccwpck_require__(85029);
const v2beta2ExternalMetricSource_1 = __nccwpck_require__(75145);
const v2beta2ExternalMetricStatus_1 = __nccwpck_require__(12390);
const v2beta2HPAScalingPolicy_1 = __nccwpck_require__(34096);
const v2beta2HPAScalingRules_1 = __nccwpck_require__(33665);
const v2beta2HorizontalPodAutoscaler_1 = __nccwpck_require__(96952);
const v2beta2HorizontalPodAutoscalerBehavior_1 = __nccwpck_require__(41473);
const v2beta2HorizontalPodAutoscalerCondition_1 = __nccwpck_require__(67231);
const v2beta2HorizontalPodAutoscalerList_1 = __nccwpck_require__(46788);
const v2beta2HorizontalPodAutoscalerSpec_1 = __nccwpck_require__(17298);
const v2beta2HorizontalPodAutoscalerStatus_1 = __nccwpck_require__(60715);
const v2beta2MetricIdentifier_1 = __nccwpck_require__(73280);
const v2beta2MetricSpec_1 = __nccwpck_require__(54941);
const v2beta2MetricStatus_1 = __nccwpck_require__(5415);
const v2beta2MetricTarget_1 = __nccwpck_require__(17383);
const v2beta2MetricValueStatus_1 = __nccwpck_require__(61416);
const v2beta2ObjectMetricSource_1 = __nccwpck_require__(56126);
const v2beta2ObjectMetricStatus_1 = __nccwpck_require__(60958);
const v2beta2PodsMetricSource_1 = __nccwpck_require__(46865);
const v2beta2PodsMetricStatus_1 = __nccwpck_require__(78411);
const v2beta2ResourceMetricSource_1 = __nccwpck_require__(23137);
const v2beta2ResourceMetricStatus_1 = __nccwpck_require__(849);
const versionInfo_1 = __nccwpck_require__(17451);
/* tslint:disable:no-unused-variable */
let primitives = [
"string",
"boolean",
"double",
"integer",
"long",
"float",
"number",
"any"
];
let enumsMap = {};
let typeMap = {
"AdmissionregistrationV1ServiceReference": admissionregistrationV1ServiceReference_1.AdmissionregistrationV1ServiceReference,
"AdmissionregistrationV1WebhookClientConfig": admissionregistrationV1WebhookClientConfig_1.AdmissionregistrationV1WebhookClientConfig,
"ApiextensionsV1ServiceReference": apiextensionsV1ServiceReference_1.ApiextensionsV1ServiceReference,
"ApiextensionsV1WebhookClientConfig": apiextensionsV1WebhookClientConfig_1.ApiextensionsV1WebhookClientConfig,
"ApiregistrationV1ServiceReference": apiregistrationV1ServiceReference_1.ApiregistrationV1ServiceReference,
"AuthenticationV1TokenRequest": authenticationV1TokenRequest_1.AuthenticationV1TokenRequest,
"CoreV1EndpointPort": coreV1EndpointPort_1.CoreV1EndpointPort,
"CoreV1Event": coreV1Event_1.CoreV1Event,
"CoreV1EventList": coreV1EventList_1.CoreV1EventList,
"CoreV1EventSeries": coreV1EventSeries_1.CoreV1EventSeries,
"DiscoveryV1EndpointPort": discoveryV1EndpointPort_1.DiscoveryV1EndpointPort,
"EventsV1Event": eventsV1Event_1.EventsV1Event,
"EventsV1EventList": eventsV1EventList_1.EventsV1EventList,
"EventsV1EventSeries": eventsV1EventSeries_1.EventsV1EventSeries,
"StorageV1TokenRequest": storageV1TokenRequest_1.StorageV1TokenRequest,
"V1APIGroup": v1APIGroup_1.V1APIGroup,
"V1APIGroupList": v1APIGroupList_1.V1APIGroupList,
"V1APIResource": v1APIResource_1.V1APIResource,
"V1APIResourceList": v1APIResourceList_1.V1APIResourceList,
"V1APIService": v1APIService_1.V1APIService,
"V1APIServiceCondition": v1APIServiceCondition_1.V1APIServiceCondition,
"V1APIServiceList": v1APIServiceList_1.V1APIServiceList,
"V1APIServiceSpec": v1APIServiceSpec_1.V1APIServiceSpec,
"V1APIServiceStatus": v1APIServiceStatus_1.V1APIServiceStatus,
"V1APIVersions": v1APIVersions_1.V1APIVersions,
"V1AWSElasticBlockStoreVolumeSource": v1AWSElasticBlockStoreVolumeSource_1.V1AWSElasticBlockStoreVolumeSource,
"V1Affinity": v1Affinity_1.V1Affinity,
"V1AggregationRule": v1AggregationRule_1.V1AggregationRule,
"V1AttachedVolume": v1AttachedVolume_1.V1AttachedVolume,
"V1AzureDiskVolumeSource": v1AzureDiskVolumeSource_1.V1AzureDiskVolumeSource,
"V1AzureFilePersistentVolumeSource": v1AzureFilePersistentVolumeSource_1.V1AzureFilePersistentVolumeSource,
"V1AzureFileVolumeSource": v1AzureFileVolumeSource_1.V1AzureFileVolumeSource,
"V1Binding": v1Binding_1.V1Binding,
"V1BoundObjectReference": v1BoundObjectReference_1.V1BoundObjectReference,
"V1CSIDriver": v1CSIDriver_1.V1CSIDriver,
"V1CSIDriverList": v1CSIDriverList_1.V1CSIDriverList,
"V1CSIDriverSpec": v1CSIDriverSpec_1.V1CSIDriverSpec,
"V1CSINode": v1CSINode_1.V1CSINode,
"V1CSINodeDriver": v1CSINodeDriver_1.V1CSINodeDriver,
"V1CSINodeList": v1CSINodeList_1.V1CSINodeList,
"V1CSINodeSpec": v1CSINodeSpec_1.V1CSINodeSpec,
"V1CSIPersistentVolumeSource": v1CSIPersistentVolumeSource_1.V1CSIPersistentVolumeSource,
"V1CSIVolumeSource": v1CSIVolumeSource_1.V1CSIVolumeSource,
"V1Capabilities": v1Capabilities_1.V1Capabilities,
"V1CephFSPersistentVolumeSource": v1CephFSPersistentVolumeSource_1.V1CephFSPersistentVolumeSource,
"V1CephFSVolumeSource": v1CephFSVolumeSource_1.V1CephFSVolumeSource,
"V1CertificateSigningRequest": v1CertificateSigningRequest_1.V1CertificateSigningRequest,
"V1CertificateSigningRequestCondition": v1CertificateSigningRequestCondition_1.V1CertificateSigningRequestCondition,
"V1CertificateSigningRequestList": v1CertificateSigningRequestList_1.V1CertificateSigningRequestList,
"V1CertificateSigningRequestSpec": v1CertificateSigningRequestSpec_1.V1CertificateSigningRequestSpec,
"V1CertificateSigningRequestStatus": v1CertificateSigningRequestStatus_1.V1CertificateSigningRequestStatus,
"V1CinderPersistentVolumeSource": v1CinderPersistentVolumeSource_1.V1CinderPersistentVolumeSource,
"V1CinderVolumeSource": v1CinderVolumeSource_1.V1CinderVolumeSource,
"V1ClientIPConfig": v1ClientIPConfig_1.V1ClientIPConfig,
"V1ClusterRole": v1ClusterRole_1.V1ClusterRole,
"V1ClusterRoleBinding": v1ClusterRoleBinding_1.V1ClusterRoleBinding,
"V1ClusterRoleBindingList": v1ClusterRoleBindingList_1.V1ClusterRoleBindingList,
"V1ClusterRoleList": v1ClusterRoleList_1.V1ClusterRoleList,
"V1ComponentCondition": v1ComponentCondition_1.V1ComponentCondition,
"V1ComponentStatus": v1ComponentStatus_1.V1ComponentStatus,
"V1ComponentStatusList": v1ComponentStatusList_1.V1ComponentStatusList,
"V1Condition": v1Condition_1.V1Condition,
"V1ConfigMap": v1ConfigMap_1.V1ConfigMap,
"V1ConfigMapEnvSource": v1ConfigMapEnvSource_1.V1ConfigMapEnvSource,
"V1ConfigMapKeySelector": v1ConfigMapKeySelector_1.V1ConfigMapKeySelector,
"V1ConfigMapList": v1ConfigMapList_1.V1ConfigMapList,
"V1ConfigMapNodeConfigSource": v1ConfigMapNodeConfigSource_1.V1ConfigMapNodeConfigSource,
"V1ConfigMapProjection": v1ConfigMapProjection_1.V1ConfigMapProjection,
"V1ConfigMapVolumeSource": v1ConfigMapVolumeSource_1.V1ConfigMapVolumeSource,
"V1Container": v1Container_1.V1Container,
"V1ContainerImage": v1ContainerImage_1.V1ContainerImage,
"V1ContainerPort": v1ContainerPort_1.V1ContainerPort,
"V1ContainerState": v1ContainerState_1.V1ContainerState,
"V1ContainerStateRunning": v1ContainerStateRunning_1.V1ContainerStateRunning,
"V1ContainerStateTerminated": v1ContainerStateTerminated_1.V1ContainerStateTerminated,
"V1ContainerStateWaiting": v1ContainerStateWaiting_1.V1ContainerStateWaiting,
"V1ContainerStatus": v1ContainerStatus_1.V1ContainerStatus,
"V1ControllerRevision": v1ControllerRevision_1.V1ControllerRevision,
"V1ControllerRevisionList": v1ControllerRevisionList_1.V1ControllerRevisionList,
"V1CronJob": v1CronJob_1.V1CronJob,
"V1CronJobList": v1CronJobList_1.V1CronJobList,
"V1CronJobSpec": v1CronJobSpec_1.V1CronJobSpec,
"V1CronJobStatus": v1CronJobStatus_1.V1CronJobStatus,
"V1CrossVersionObjectReference": v1CrossVersionObjectReference_1.V1CrossVersionObjectReference,
"V1CustomResourceColumnDefinition": v1CustomResourceColumnDefinition_1.V1CustomResourceColumnDefinition,
"V1CustomResourceConversion": v1CustomResourceConversion_1.V1CustomResourceConversion,
"V1CustomResourceDefinition": v1CustomResourceDefinition_1.V1CustomResourceDefinition,
"V1CustomResourceDefinitionCondition": v1CustomResourceDefinitionCondition_1.V1CustomResourceDefinitionCondition,
"V1CustomResourceDefinitionList": v1CustomResourceDefinitionList_1.V1CustomResourceDefinitionList,
"V1CustomResourceDefinitionNames": v1CustomResourceDefinitionNames_1.V1CustomResourceDefinitionNames,
"V1CustomResourceDefinitionSpec": v1CustomResourceDefinitionSpec_1.V1CustomResourceDefinitionSpec,
"V1CustomResourceDefinitionStatus": v1CustomResourceDefinitionStatus_1.V1CustomResourceDefinitionStatus,
"V1CustomResourceDefinitionVersion": v1CustomResourceDefinitionVersion_1.V1CustomResourceDefinitionVersion,
"V1CustomResourceSubresourceScale": v1CustomResourceSubresourceScale_1.V1CustomResourceSubresourceScale,
"V1CustomResourceSubresources": v1CustomResourceSubresources_1.V1CustomResourceSubresources,
"V1CustomResourceValidation": v1CustomResourceValidation_1.V1CustomResourceValidation,
"V1DaemonEndpoint": v1DaemonEndpoint_1.V1DaemonEndpoint,
"V1DaemonSet": v1DaemonSet_1.V1DaemonSet,
"V1DaemonSetCondition": v1DaemonSetCondition_1.V1DaemonSetCondition,
"V1DaemonSetList": v1DaemonSetList_1.V1DaemonSetList,
"V1DaemonSetSpec": v1DaemonSetSpec_1.V1DaemonSetSpec,
"V1DaemonSetStatus": v1DaemonSetStatus_1.V1DaemonSetStatus,
"V1DaemonSetUpdateStrategy": v1DaemonSetUpdateStrategy_1.V1DaemonSetUpdateStrategy,
"V1DeleteOptions": v1DeleteOptions_1.V1DeleteOptions,
"V1Deployment": v1Deployment_1.V1Deployment,
"V1DeploymentCondition": v1DeploymentCondition_1.V1DeploymentCondition,
"V1DeploymentList": v1DeploymentList_1.V1DeploymentList,
"V1DeploymentSpec": v1DeploymentSpec_1.V1DeploymentSpec,
"V1DeploymentStatus": v1DeploymentStatus_1.V1DeploymentStatus,
"V1DeploymentStrategy": v1DeploymentStrategy_1.V1DeploymentStrategy,
"V1DownwardAPIProjection": v1DownwardAPIProjection_1.V1DownwardAPIProjection,
"V1DownwardAPIVolumeFile": v1DownwardAPIVolumeFile_1.V1DownwardAPIVolumeFile,
"V1DownwardAPIVolumeSource": v1DownwardAPIVolumeSource_1.V1DownwardAPIVolumeSource,
"V1EmptyDirVolumeSource": v1EmptyDirVolumeSource_1.V1EmptyDirVolumeSource,
"V1Endpoint": v1Endpoint_1.V1Endpoint,
"V1EndpointAddress": v1EndpointAddress_1.V1EndpointAddress,
"V1EndpointConditions": v1EndpointConditions_1.V1EndpointConditions,
"V1EndpointHints": v1EndpointHints_1.V1EndpointHints,
"V1EndpointSlice": v1EndpointSlice_1.V1EndpointSlice,
"V1EndpointSliceList": v1EndpointSliceList_1.V1EndpointSliceList,
"V1EndpointSubset": v1EndpointSubset_1.V1EndpointSubset,
"V1Endpoints": v1Endpoints_1.V1Endpoints,
"V1EndpointsList": v1EndpointsList_1.V1EndpointsList,
"V1EnvFromSource": v1EnvFromSource_1.V1EnvFromSource,
"V1EnvVar": v1EnvVar_1.V1EnvVar,
"V1EnvVarSource": v1EnvVarSource_1.V1EnvVarSource,
"V1EphemeralContainer": v1EphemeralContainer_1.V1EphemeralContainer,
"V1EphemeralVolumeSource": v1EphemeralVolumeSource_1.V1EphemeralVolumeSource,
"V1EventSource": v1EventSource_1.V1EventSource,
"V1Eviction": v1Eviction_1.V1Eviction,
"V1ExecAction": v1ExecAction_1.V1ExecAction,
"V1ExternalDocumentation": v1ExternalDocumentation_1.V1ExternalDocumentation,
"V1FCVolumeSource": v1FCVolumeSource_1.V1FCVolumeSource,
"V1FlexPersistentVolumeSource": v1FlexPersistentVolumeSource_1.V1FlexPersistentVolumeSource,
"V1FlexVolumeSource": v1FlexVolumeSource_1.V1FlexVolumeSource,
"V1FlockerVolumeSource": v1FlockerVolumeSource_1.V1FlockerVolumeSource,
"V1ForZone": v1ForZone_1.V1ForZone,
"V1GCEPersistentDiskVolumeSource": v1GCEPersistentDiskVolumeSource_1.V1GCEPersistentDiskVolumeSource,
"V1GitRepoVolumeSource": v1GitRepoVolumeSource_1.V1GitRepoVolumeSource,
"V1GlusterfsPersistentVolumeSource": v1GlusterfsPersistentVolumeSource_1.V1GlusterfsPersistentVolumeSource,
"V1GlusterfsVolumeSource": v1GlusterfsVolumeSource_1.V1GlusterfsVolumeSource,
"V1GroupVersionForDiscovery": v1GroupVersionForDiscovery_1.V1GroupVersionForDiscovery,
"V1HTTPGetAction": v1HTTPGetAction_1.V1HTTPGetAction,
"V1HTTPHeader": v1HTTPHeader_1.V1HTTPHeader,
"V1HTTPIngressPath": v1HTTPIngressPath_1.V1HTTPIngressPath,
"V1HTTPIngressRuleValue": v1HTTPIngressRuleValue_1.V1HTTPIngressRuleValue,
"V1Handler": v1Handler_1.V1Handler,
"V1HorizontalPodAutoscaler": v1HorizontalPodAutoscaler_1.V1HorizontalPodAutoscaler,
"V1HorizontalPodAutoscalerList": v1HorizontalPodAutoscalerList_1.V1HorizontalPodAutoscalerList,
"V1HorizontalPodAutoscalerSpec": v1HorizontalPodAutoscalerSpec_1.V1HorizontalPodAutoscalerSpec,
"V1HorizontalPodAutoscalerStatus": v1HorizontalPodAutoscalerStatus_1.V1HorizontalPodAutoscalerStatus,
"V1HostAlias": v1HostAlias_1.V1HostAlias,
"V1HostPathVolumeSource": v1HostPathVolumeSource_1.V1HostPathVolumeSource,
"V1IPBlock": v1IPBlock_1.V1IPBlock,
"V1ISCSIPersistentVolumeSource": v1ISCSIPersistentVolumeSource_1.V1ISCSIPersistentVolumeSource,
"V1ISCSIVolumeSource": v1ISCSIVolumeSource_1.V1ISCSIVolumeSource,
"V1Ingress": v1Ingress_1.V1Ingress,
"V1IngressBackend": v1IngressBackend_1.V1IngressBackend,
"V1IngressClass": v1IngressClass_1.V1IngressClass,
"V1IngressClassList": v1IngressClassList_1.V1IngressClassList,
"V1IngressClassParametersReference": v1IngressClassParametersReference_1.V1IngressClassParametersReference,
"V1IngressClassSpec": v1IngressClassSpec_1.V1IngressClassSpec,
"V1IngressList": v1IngressList_1.V1IngressList,
"V1IngressRule": v1IngressRule_1.V1IngressRule,
"V1IngressServiceBackend": v1IngressServiceBackend_1.V1IngressServiceBackend,
"V1IngressSpec": v1IngressSpec_1.V1IngressSpec,
"V1IngressStatus": v1IngressStatus_1.V1IngressStatus,
"V1IngressTLS": v1IngressTLS_1.V1IngressTLS,
"V1JSONSchemaProps": v1JSONSchemaProps_1.V1JSONSchemaProps,
"V1Job": v1Job_1.V1Job,
"V1JobCondition": v1JobCondition_1.V1JobCondition,
"V1JobList": v1JobList_1.V1JobList,
"V1JobSpec": v1JobSpec_1.V1JobSpec,
"V1JobStatus": v1JobStatus_1.V1JobStatus,
"V1JobTemplateSpec": v1JobTemplateSpec_1.V1JobTemplateSpec,
"V1KeyToPath": v1KeyToPath_1.V1KeyToPath,
"V1LabelSelector": v1LabelSelector_1.V1LabelSelector,
"V1LabelSelectorRequirement": v1LabelSelectorRequirement_1.V1LabelSelectorRequirement,
"V1Lease": v1Lease_1.V1Lease,
"V1LeaseList": v1LeaseList_1.V1LeaseList,
"V1LeaseSpec": v1LeaseSpec_1.V1LeaseSpec,
"V1Lifecycle": v1Lifecycle_1.V1Lifecycle,
"V1LimitRange": v1LimitRange_1.V1LimitRange,
"V1LimitRangeItem": v1LimitRangeItem_1.V1LimitRangeItem,
"V1LimitRangeList": v1LimitRangeList_1.V1LimitRangeList,
"V1LimitRangeSpec": v1LimitRangeSpec_1.V1LimitRangeSpec,
"V1ListMeta": v1ListMeta_1.V1ListMeta,
"V1LoadBalancerIngress": v1LoadBalancerIngress_1.V1LoadBalancerIngress,
"V1LoadBalancerStatus": v1LoadBalancerStatus_1.V1LoadBalancerStatus,
"V1LocalObjectReference": v1LocalObjectReference_1.V1LocalObjectReference,
"V1LocalSubjectAccessReview": v1LocalSubjectAccessReview_1.V1LocalSubjectAccessReview,
"V1LocalVolumeSource": v1LocalVolumeSource_1.V1LocalVolumeSource,
"V1ManagedFieldsEntry": v1ManagedFieldsEntry_1.V1ManagedFieldsEntry,
"V1MutatingWebhook": v1MutatingWebhook_1.V1MutatingWebhook,
"V1MutatingWebhookConfiguration": v1MutatingWebhookConfiguration_1.V1MutatingWebhookConfiguration,
"V1MutatingWebhookConfigurationList": v1MutatingWebhookConfigurationList_1.V1MutatingWebhookConfigurationList,
"V1NFSVolumeSource": v1NFSVolumeSource_1.V1NFSVolumeSource,
"V1Namespace": v1Namespace_1.V1Namespace,
"V1NamespaceCondition": v1NamespaceCondition_1.V1NamespaceCondition,
"V1NamespaceList": v1NamespaceList_1.V1NamespaceList,
"V1NamespaceSpec": v1NamespaceSpec_1.V1NamespaceSpec,
"V1NamespaceStatus": v1NamespaceStatus_1.V1NamespaceStatus,
"V1NetworkPolicy": v1NetworkPolicy_1.V1NetworkPolicy,
"V1NetworkPolicyEgressRule": v1NetworkPolicyEgressRule_1.V1NetworkPolicyEgressRule,
"V1NetworkPolicyIngressRule": v1NetworkPolicyIngressRule_1.V1NetworkPolicyIngressRule,
"V1NetworkPolicyList": v1NetworkPolicyList_1.V1NetworkPolicyList,
"V1NetworkPolicyPeer": v1NetworkPolicyPeer_1.V1NetworkPolicyPeer,
"V1NetworkPolicyPort": v1NetworkPolicyPort_1.V1NetworkPolicyPort,
"V1NetworkPolicySpec": v1NetworkPolicySpec_1.V1NetworkPolicySpec,
"V1Node": v1Node_1.V1Node,
"V1NodeAddress": v1NodeAddress_1.V1NodeAddress,
"V1NodeAffinity": v1NodeAffinity_1.V1NodeAffinity,
"V1NodeCondition": v1NodeCondition_1.V1NodeCondition,
"V1NodeConfigSource": v1NodeConfigSource_1.V1NodeConfigSource,
"V1NodeConfigStatus": v1NodeConfigStatus_1.V1NodeConfigStatus,
"V1NodeDaemonEndpoints": v1NodeDaemonEndpoints_1.V1NodeDaemonEndpoints,
"V1NodeList": v1NodeList_1.V1NodeList,
"V1NodeSelector": v1NodeSelector_1.V1NodeSelector,
"V1NodeSelectorRequirement": v1NodeSelectorRequirement_1.V1NodeSelectorRequirement,
"V1NodeSelectorTerm": v1NodeSelectorTerm_1.V1NodeSelectorTerm,
"V1NodeSpec": v1NodeSpec_1.V1NodeSpec,
"V1NodeStatus": v1NodeStatus_1.V1NodeStatus,
"V1NodeSystemInfo": v1NodeSystemInfo_1.V1NodeSystemInfo,
"V1NonResourceAttributes": v1NonResourceAttributes_1.V1NonResourceAttributes,
"V1NonResourceRule": v1NonResourceRule_1.V1NonResourceRule,
"V1ObjectFieldSelector": v1ObjectFieldSelector_1.V1ObjectFieldSelector,
"V1ObjectMeta": v1ObjectMeta_1.V1ObjectMeta,
"V1ObjectReference": v1ObjectReference_1.V1ObjectReference,
"V1Overhead": v1Overhead_1.V1Overhead,
"V1OwnerReference": v1OwnerReference_1.V1OwnerReference,
"V1PersistentVolume": v1PersistentVolume_1.V1PersistentVolume,
"V1PersistentVolumeClaim": v1PersistentVolumeClaim_1.V1PersistentVolumeClaim,
"V1PersistentVolumeClaimCondition": v1PersistentVolumeClaimCondition_1.V1PersistentVolumeClaimCondition,
"V1PersistentVolumeClaimList": v1PersistentVolumeClaimList_1.V1PersistentVolumeClaimList,
"V1PersistentVolumeClaimSpec": v1PersistentVolumeClaimSpec_1.V1PersistentVolumeClaimSpec,
"V1PersistentVolumeClaimStatus": v1PersistentVolumeClaimStatus_1.V1PersistentVolumeClaimStatus,
"V1PersistentVolumeClaimTemplate": v1PersistentVolumeClaimTemplate_1.V1PersistentVolumeClaimTemplate,
"V1PersistentVolumeClaimVolumeSource": v1PersistentVolumeClaimVolumeSource_1.V1PersistentVolumeClaimVolumeSource,
"V1PersistentVolumeList": v1PersistentVolumeList_1.V1PersistentVolumeList,
"V1PersistentVolumeSpec": v1PersistentVolumeSpec_1.V1PersistentVolumeSpec,
"V1PersistentVolumeStatus": v1PersistentVolumeStatus_1.V1PersistentVolumeStatus,
"V1PhotonPersistentDiskVolumeSource": v1PhotonPersistentDiskVolumeSource_1.V1PhotonPersistentDiskVolumeSource,
"V1Pod": v1Pod_1.V1Pod,
"V1PodAffinity": v1PodAffinity_1.V1PodAffinity,
"V1PodAffinityTerm": v1PodAffinityTerm_1.V1PodAffinityTerm,
"V1PodAntiAffinity": v1PodAntiAffinity_1.V1PodAntiAffinity,
"V1PodCondition": v1PodCondition_1.V1PodCondition,
"V1PodDNSConfig": v1PodDNSConfig_1.V1PodDNSConfig,
"V1PodDNSConfigOption": v1PodDNSConfigOption_1.V1PodDNSConfigOption,
"V1PodDisruptionBudget": v1PodDisruptionBudget_1.V1PodDisruptionBudget,
"V1PodDisruptionBudgetList": v1PodDisruptionBudgetList_1.V1PodDisruptionBudgetList,
"V1PodDisruptionBudgetSpec": v1PodDisruptionBudgetSpec_1.V1PodDisruptionBudgetSpec,
"V1PodDisruptionBudgetStatus": v1PodDisruptionBudgetStatus_1.V1PodDisruptionBudgetStatus,
"V1PodIP": v1PodIP_1.V1PodIP,
"V1PodList": v1PodList_1.V1PodList,
"V1PodReadinessGate": v1PodReadinessGate_1.V1PodReadinessGate,
"V1PodSecurityContext": v1PodSecurityContext_1.V1PodSecurityContext,
"V1PodSpec": v1PodSpec_1.V1PodSpec,
"V1PodStatus": v1PodStatus_1.V1PodStatus,
"V1PodTemplate": v1PodTemplate_1.V1PodTemplate,
"V1PodTemplateList": v1PodTemplateList_1.V1PodTemplateList,
"V1PodTemplateSpec": v1PodTemplateSpec_1.V1PodTemplateSpec,
"V1PolicyRule": v1PolicyRule_1.V1PolicyRule,
"V1PortStatus": v1PortStatus_1.V1PortStatus,
"V1PortworxVolumeSource": v1PortworxVolumeSource_1.V1PortworxVolumeSource,
"V1Preconditions": v1Preconditions_1.V1Preconditions,
"V1PreferredSchedulingTerm": v1PreferredSchedulingTerm_1.V1PreferredSchedulingTerm,
"V1PriorityClass": v1PriorityClass_1.V1PriorityClass,
"V1PriorityClassList": v1PriorityClassList_1.V1PriorityClassList,
"V1Probe": v1Probe_1.V1Probe,
"V1ProjectedVolumeSource": v1ProjectedVolumeSource_1.V1ProjectedVolumeSource,
"V1QuobyteVolumeSource": v1QuobyteVolumeSource_1.V1QuobyteVolumeSource,
"V1RBDPersistentVolumeSource": v1RBDPersistentVolumeSource_1.V1RBDPersistentVolumeSource,
"V1RBDVolumeSource": v1RBDVolumeSource_1.V1RBDVolumeSource,
"V1ReplicaSet": v1ReplicaSet_1.V1ReplicaSet,
"V1ReplicaSetCondition": v1ReplicaSetCondition_1.V1ReplicaSetCondition,
"V1ReplicaSetList": v1ReplicaSetList_1.V1ReplicaSetList,
"V1ReplicaSetSpec": v1ReplicaSetSpec_1.V1ReplicaSetSpec,
"V1ReplicaSetStatus": v1ReplicaSetStatus_1.V1ReplicaSetStatus,
"V1ReplicationController": v1ReplicationController_1.V1ReplicationController,
"V1ReplicationControllerCondition": v1ReplicationControllerCondition_1.V1ReplicationControllerCondition,
"V1ReplicationControllerList": v1ReplicationControllerList_1.V1ReplicationControllerList,
"V1ReplicationControllerSpec": v1ReplicationControllerSpec_1.V1ReplicationControllerSpec,
"V1ReplicationControllerStatus": v1ReplicationControllerStatus_1.V1ReplicationControllerStatus,
"V1ResourceAttributes": v1ResourceAttributes_1.V1ResourceAttributes,
"V1ResourceFieldSelector": v1ResourceFieldSelector_1.V1ResourceFieldSelector,
"V1ResourceQuota": v1ResourceQuota_1.V1ResourceQuota,
"V1ResourceQuotaList": v1ResourceQuotaList_1.V1ResourceQuotaList,
"V1ResourceQuotaSpec": v1ResourceQuotaSpec_1.V1ResourceQuotaSpec,
"V1ResourceQuotaStatus": v1ResourceQuotaStatus_1.V1ResourceQuotaStatus,
"V1ResourceRequirements": v1ResourceRequirements_1.V1ResourceRequirements,
"V1ResourceRule": v1ResourceRule_1.V1ResourceRule,
"V1Role": v1Role_1.V1Role,
"V1RoleBinding": v1RoleBinding_1.V1RoleBinding,
"V1RoleBindingList": v1RoleBindingList_1.V1RoleBindingList,
"V1RoleList": v1RoleList_1.V1RoleList,
"V1RoleRef": v1RoleRef_1.V1RoleRef,
"V1RollingUpdateDaemonSet": v1RollingUpdateDaemonSet_1.V1RollingUpdateDaemonSet,
"V1RollingUpdateDeployment": v1RollingUpdateDeployment_1.V1RollingUpdateDeployment,
"V1RollingUpdateStatefulSetStrategy": v1RollingUpdateStatefulSetStrategy_1.V1RollingUpdateStatefulSetStrategy,
"V1RuleWithOperations": v1RuleWithOperations_1.V1RuleWithOperations,
"V1RuntimeClass": v1RuntimeClass_1.V1RuntimeClass,
"V1RuntimeClassList": v1RuntimeClassList_1.V1RuntimeClassList,
"V1SELinuxOptions": v1SELinuxOptions_1.V1SELinuxOptions,
"V1Scale": v1Scale_1.V1Scale,
"V1ScaleIOPersistentVolumeSource": v1ScaleIOPersistentVolumeSource_1.V1ScaleIOPersistentVolumeSource,
"V1ScaleIOVolumeSource": v1ScaleIOVolumeSource_1.V1ScaleIOVolumeSource,
"V1ScaleSpec": v1ScaleSpec_1.V1ScaleSpec,
"V1ScaleStatus": v1ScaleStatus_1.V1ScaleStatus,
"V1Scheduling": v1Scheduling_1.V1Scheduling,
"V1ScopeSelector": v1ScopeSelector_1.V1ScopeSelector,
"V1ScopedResourceSelectorRequirement": v1ScopedResourceSelectorRequirement_1.V1ScopedResourceSelectorRequirement,
"V1SeccompProfile": v1SeccompProfile_1.V1SeccompProfile,
"V1Secret": v1Secret_1.V1Secret,
"V1SecretEnvSource": v1SecretEnvSource_1.V1SecretEnvSource,
"V1SecretKeySelector": v1SecretKeySelector_1.V1SecretKeySelector,
"V1SecretList": v1SecretList_1.V1SecretList,
"V1SecretProjection": v1SecretProjection_1.V1SecretProjection,
"V1SecretReference": v1SecretReference_1.V1SecretReference,
"V1SecretVolumeSource": v1SecretVolumeSource_1.V1SecretVolumeSource,
"V1SecurityContext": v1SecurityContext_1.V1SecurityContext,
"V1SelfSubjectAccessReview": v1SelfSubjectAccessReview_1.V1SelfSubjectAccessReview,
"V1SelfSubjectAccessReviewSpec": v1SelfSubjectAccessReviewSpec_1.V1SelfSubjectAccessReviewSpec,
"V1SelfSubjectRulesReview": v1SelfSubjectRulesReview_1.V1SelfSubjectRulesReview,
"V1SelfSubjectRulesReviewSpec": v1SelfSubjectRulesReviewSpec_1.V1SelfSubjectRulesReviewSpec,
"V1ServerAddressByClientCIDR": v1ServerAddressByClientCIDR_1.V1ServerAddressByClientCIDR,
"V1Service": v1Service_1.V1Service,
"V1ServiceAccount": v1ServiceAccount_1.V1ServiceAccount,
"V1ServiceAccountList": v1ServiceAccountList_1.V1ServiceAccountList,
"V1ServiceAccountTokenProjection": v1ServiceAccountTokenProjection_1.V1ServiceAccountTokenProjection,
"V1ServiceBackendPort": v1ServiceBackendPort_1.V1ServiceBackendPort,
"V1ServiceList": v1ServiceList_1.V1ServiceList,
"V1ServicePort": v1ServicePort_1.V1ServicePort,
"V1ServiceSpec": v1ServiceSpec_1.V1ServiceSpec,
"V1ServiceStatus": v1ServiceStatus_1.V1ServiceStatus,
"V1SessionAffinityConfig": v1SessionAffinityConfig_1.V1SessionAffinityConfig,
"V1StatefulSet": v1StatefulSet_1.V1StatefulSet,
"V1StatefulSetCondition": v1StatefulSetCondition_1.V1StatefulSetCondition,
"V1StatefulSetList": v1StatefulSetList_1.V1StatefulSetList,
"V1StatefulSetSpec": v1StatefulSetSpec_1.V1StatefulSetSpec,
"V1StatefulSetStatus": v1StatefulSetStatus_1.V1StatefulSetStatus,
"V1StatefulSetUpdateStrategy": v1StatefulSetUpdateStrategy_1.V1StatefulSetUpdateStrategy,
"V1Status": v1Status_1.V1Status,
"V1StatusCause": v1StatusCause_1.V1StatusCause,
"V1StatusDetails": v1StatusDetails_1.V1StatusDetails,
"V1StorageClass": v1StorageClass_1.V1StorageClass,
"V1StorageClassList": v1StorageClassList_1.V1StorageClassList,
"V1StorageOSPersistentVolumeSource": v1StorageOSPersistentVolumeSource_1.V1StorageOSPersistentVolumeSource,
"V1StorageOSVolumeSource": v1StorageOSVolumeSource_1.V1StorageOSVolumeSource,
"V1Subject": v1Subject_1.V1Subject,
"V1SubjectAccessReview": v1SubjectAccessReview_1.V1SubjectAccessReview,
"V1SubjectAccessReviewSpec": v1SubjectAccessReviewSpec_1.V1SubjectAccessReviewSpec,
"V1SubjectAccessReviewStatus": v1SubjectAccessReviewStatus_1.V1SubjectAccessReviewStatus,
"V1SubjectRulesReviewStatus": v1SubjectRulesReviewStatus_1.V1SubjectRulesReviewStatus,
"V1Sysctl": v1Sysctl_1.V1Sysctl,
"V1TCPSocketAction": v1TCPSocketAction_1.V1TCPSocketAction,
"V1Taint": v1Taint_1.V1Taint,
"V1TokenRequestSpec": v1TokenRequestSpec_1.V1TokenRequestSpec,
"V1TokenRequestStatus": v1TokenRequestStatus_1.V1TokenRequestStatus,
"V1TokenReview": v1TokenReview_1.V1TokenReview,
"V1TokenReviewSpec": v1TokenReviewSpec_1.V1TokenReviewSpec,
"V1TokenReviewStatus": v1TokenReviewStatus_1.V1TokenReviewStatus,
"V1Toleration": v1Toleration_1.V1Toleration,
"V1TopologySelectorLabelRequirement": v1TopologySelectorLabelRequirement_1.V1TopologySelectorLabelRequirement,
"V1TopologySelectorTerm": v1TopologySelectorTerm_1.V1TopologySelectorTerm,
"V1TopologySpreadConstraint": v1TopologySpreadConstraint_1.V1TopologySpreadConstraint,
"V1TypedLocalObjectReference": v1TypedLocalObjectReference_1.V1TypedLocalObjectReference,
"V1UncountedTerminatedPods": v1UncountedTerminatedPods_1.V1UncountedTerminatedPods,
"V1UserInfo": v1UserInfo_1.V1UserInfo,
"V1ValidatingWebhook": v1ValidatingWebhook_1.V1ValidatingWebhook,
"V1ValidatingWebhookConfiguration": v1ValidatingWebhookConfiguration_1.V1ValidatingWebhookConfiguration,
"V1ValidatingWebhookConfigurationList": v1ValidatingWebhookConfigurationList_1.V1ValidatingWebhookConfigurationList,
"V1Volume": v1Volume_1.V1Volume,
"V1VolumeAttachment": v1VolumeAttachment_1.V1VolumeAttachment,
"V1VolumeAttachmentList": v1VolumeAttachmentList_1.V1VolumeAttachmentList,
"V1VolumeAttachmentSource": v1VolumeAttachmentSource_1.V1VolumeAttachmentSource,
"V1VolumeAttachmentSpec": v1VolumeAttachmentSpec_1.V1VolumeAttachmentSpec,
"V1VolumeAttachmentStatus": v1VolumeAttachmentStatus_1.V1VolumeAttachmentStatus,
"V1VolumeDevice": v1VolumeDevice_1.V1VolumeDevice,
"V1VolumeError": v1VolumeError_1.V1VolumeError,
"V1VolumeMount": v1VolumeMount_1.V1VolumeMount,
"V1VolumeNodeAffinity": v1VolumeNodeAffinity_1.V1VolumeNodeAffinity,
"V1VolumeNodeResources": v1VolumeNodeResources_1.V1VolumeNodeResources,
"V1VolumeProjection": v1VolumeProjection_1.V1VolumeProjection,
"V1VsphereVirtualDiskVolumeSource": v1VsphereVirtualDiskVolumeSource_1.V1VsphereVirtualDiskVolumeSource,
"V1WatchEvent": v1WatchEvent_1.V1WatchEvent,
"V1WebhookConversion": v1WebhookConversion_1.V1WebhookConversion,
"V1WeightedPodAffinityTerm": v1WeightedPodAffinityTerm_1.V1WeightedPodAffinityTerm,
"V1WindowsSecurityContextOptions": v1WindowsSecurityContextOptions_1.V1WindowsSecurityContextOptions,
"V1alpha1AggregationRule": v1alpha1AggregationRule_1.V1alpha1AggregationRule,
"V1alpha1CSIStorageCapacity": v1alpha1CSIStorageCapacity_1.V1alpha1CSIStorageCapacity,
"V1alpha1CSIStorageCapacityList": v1alpha1CSIStorageCapacityList_1.V1alpha1CSIStorageCapacityList,
"V1alpha1ClusterRole": v1alpha1ClusterRole_1.V1alpha1ClusterRole,
"V1alpha1ClusterRoleBinding": v1alpha1ClusterRoleBinding_1.V1alpha1ClusterRoleBinding,
"V1alpha1ClusterRoleBindingList": v1alpha1ClusterRoleBindingList_1.V1alpha1ClusterRoleBindingList,
"V1alpha1ClusterRoleList": v1alpha1ClusterRoleList_1.V1alpha1ClusterRoleList,
"V1alpha1Overhead": v1alpha1Overhead_1.V1alpha1Overhead,
"V1alpha1PolicyRule": v1alpha1PolicyRule_1.V1alpha1PolicyRule,
"V1alpha1PriorityClass": v1alpha1PriorityClass_1.V1alpha1PriorityClass,
"V1alpha1PriorityClassList": v1alpha1PriorityClassList_1.V1alpha1PriorityClassList,
"V1alpha1Role": v1alpha1Role_1.V1alpha1Role,
"V1alpha1RoleBinding": v1alpha1RoleBinding_1.V1alpha1RoleBinding,
"V1alpha1RoleBindingList": v1alpha1RoleBindingList_1.V1alpha1RoleBindingList,
"V1alpha1RoleList": v1alpha1RoleList_1.V1alpha1RoleList,
"V1alpha1RoleRef": v1alpha1RoleRef_1.V1alpha1RoleRef,
"V1alpha1RuntimeClass": v1alpha1RuntimeClass_1.V1alpha1RuntimeClass,
"V1alpha1RuntimeClassList": v1alpha1RuntimeClassList_1.V1alpha1RuntimeClassList,
"V1alpha1RuntimeClassSpec": v1alpha1RuntimeClassSpec_1.V1alpha1RuntimeClassSpec,
"V1alpha1Scheduling": v1alpha1Scheduling_1.V1alpha1Scheduling,
"V1alpha1ServerStorageVersion": v1alpha1ServerStorageVersion_1.V1alpha1ServerStorageVersion,
"V1alpha1StorageVersion": v1alpha1StorageVersion_1.V1alpha1StorageVersion,
"V1alpha1StorageVersionCondition": v1alpha1StorageVersionCondition_1.V1alpha1StorageVersionCondition,
"V1alpha1StorageVersionList": v1alpha1StorageVersionList_1.V1alpha1StorageVersionList,
"V1alpha1StorageVersionStatus": v1alpha1StorageVersionStatus_1.V1alpha1StorageVersionStatus,
"V1alpha1Subject": v1alpha1Subject_1.V1alpha1Subject,
"V1alpha1VolumeAttachment": v1alpha1VolumeAttachment_1.V1alpha1VolumeAttachment,
"V1alpha1VolumeAttachmentList": v1alpha1VolumeAttachmentList_1.V1alpha1VolumeAttachmentList,
"V1alpha1VolumeAttachmentSource": v1alpha1VolumeAttachmentSource_1.V1alpha1VolumeAttachmentSource,
"V1alpha1VolumeAttachmentSpec": v1alpha1VolumeAttachmentSpec_1.V1alpha1VolumeAttachmentSpec,
"V1alpha1VolumeAttachmentStatus": v1alpha1VolumeAttachmentStatus_1.V1alpha1VolumeAttachmentStatus,
"V1alpha1VolumeError": v1alpha1VolumeError_1.V1alpha1VolumeError,
"V1beta1AllowedCSIDriver": v1beta1AllowedCSIDriver_1.V1beta1AllowedCSIDriver,
"V1beta1AllowedFlexVolume": v1beta1AllowedFlexVolume_1.V1beta1AllowedFlexVolume,
"V1beta1AllowedHostPath": v1beta1AllowedHostPath_1.V1beta1AllowedHostPath,
"V1beta1CSIStorageCapacity": v1beta1CSIStorageCapacity_1.V1beta1CSIStorageCapacity,
"V1beta1CSIStorageCapacityList": v1beta1CSIStorageCapacityList_1.V1beta1CSIStorageCapacityList,
"V1beta1CronJob": v1beta1CronJob_1.V1beta1CronJob,
"V1beta1CronJobList": v1beta1CronJobList_1.V1beta1CronJobList,
"V1beta1CronJobSpec": v1beta1CronJobSpec_1.V1beta1CronJobSpec,
"V1beta1CronJobStatus": v1beta1CronJobStatus_1.V1beta1CronJobStatus,
"V1beta1Endpoint": v1beta1Endpoint_1.V1beta1Endpoint,
"V1beta1EndpointConditions": v1beta1EndpointConditions_1.V1beta1EndpointConditions,
"V1beta1EndpointHints": v1beta1EndpointHints_1.V1beta1EndpointHints,
"V1beta1EndpointPort": v1beta1EndpointPort_1.V1beta1EndpointPort,
"V1beta1EndpointSlice": v1beta1EndpointSlice_1.V1beta1EndpointSlice,
"V1beta1EndpointSliceList": v1beta1EndpointSliceList_1.V1beta1EndpointSliceList,
"V1beta1Event": v1beta1Event_1.V1beta1Event,
"V1beta1EventList": v1beta1EventList_1.V1beta1EventList,
"V1beta1EventSeries": v1beta1EventSeries_1.V1beta1EventSeries,
"V1beta1FSGroupStrategyOptions": v1beta1FSGroupStrategyOptions_1.V1beta1FSGroupStrategyOptions,
"V1beta1FlowDistinguisherMethod": v1beta1FlowDistinguisherMethod_1.V1beta1FlowDistinguisherMethod,
"V1beta1FlowSchema": v1beta1FlowSchema_1.V1beta1FlowSchema,
"V1beta1FlowSchemaCondition": v1beta1FlowSchemaCondition_1.V1beta1FlowSchemaCondition,
"V1beta1FlowSchemaList": v1beta1FlowSchemaList_1.V1beta1FlowSchemaList,
"V1beta1FlowSchemaSpec": v1beta1FlowSchemaSpec_1.V1beta1FlowSchemaSpec,
"V1beta1FlowSchemaStatus": v1beta1FlowSchemaStatus_1.V1beta1FlowSchemaStatus,
"V1beta1ForZone": v1beta1ForZone_1.V1beta1ForZone,
"V1beta1GroupSubject": v1beta1GroupSubject_1.V1beta1GroupSubject,
"V1beta1HostPortRange": v1beta1HostPortRange_1.V1beta1HostPortRange,
"V1beta1IDRange": v1beta1IDRange_1.V1beta1IDRange,
"V1beta1JobTemplateSpec": v1beta1JobTemplateSpec_1.V1beta1JobTemplateSpec,
"V1beta1LimitResponse": v1beta1LimitResponse_1.V1beta1LimitResponse,
"V1beta1LimitedPriorityLevelConfiguration": v1beta1LimitedPriorityLevelConfiguration_1.V1beta1LimitedPriorityLevelConfiguration,
"V1beta1NonResourcePolicyRule": v1beta1NonResourcePolicyRule_1.V1beta1NonResourcePolicyRule,
"V1beta1Overhead": v1beta1Overhead_1.V1beta1Overhead,
"V1beta1PodDisruptionBudget": v1beta1PodDisruptionBudget_1.V1beta1PodDisruptionBudget,
"V1beta1PodDisruptionBudgetList": v1beta1PodDisruptionBudgetList_1.V1beta1PodDisruptionBudgetList,
"V1beta1PodDisruptionBudgetSpec": v1beta1PodDisruptionBudgetSpec_1.V1beta1PodDisruptionBudgetSpec,
"V1beta1PodDisruptionBudgetStatus": v1beta1PodDisruptionBudgetStatus_1.V1beta1PodDisruptionBudgetStatus,
"V1beta1PodSecurityPolicy": v1beta1PodSecurityPolicy_1.V1beta1PodSecurityPolicy,
"V1beta1PodSecurityPolicyList": v1beta1PodSecurityPolicyList_1.V1beta1PodSecurityPolicyList,
"V1beta1PodSecurityPolicySpec": v1beta1PodSecurityPolicySpec_1.V1beta1PodSecurityPolicySpec,
"V1beta1PolicyRulesWithSubjects": v1beta1PolicyRulesWithSubjects_1.V1beta1PolicyRulesWithSubjects,
"V1beta1PriorityLevelConfiguration": v1beta1PriorityLevelConfiguration_1.V1beta1PriorityLevelConfiguration,
"V1beta1PriorityLevelConfigurationCondition": v1beta1PriorityLevelConfigurationCondition_1.V1beta1PriorityLevelConfigurationCondition,
"V1beta1PriorityLevelConfigurationList": v1beta1PriorityLevelConfigurationList_1.V1beta1PriorityLevelConfigurationList,
"V1beta1PriorityLevelConfigurationReference": v1beta1PriorityLevelConfigurationReference_1.V1beta1PriorityLevelConfigurationReference,
"V1beta1PriorityLevelConfigurationSpec": v1beta1PriorityLevelConfigurationSpec_1.V1beta1PriorityLevelConfigurationSpec,
"V1beta1PriorityLevelConfigurationStatus": v1beta1PriorityLevelConfigurationStatus_1.V1beta1PriorityLevelConfigurationStatus,
"V1beta1QueuingConfiguration": v1beta1QueuingConfiguration_1.V1beta1QueuingConfiguration,
"V1beta1ResourcePolicyRule": v1beta1ResourcePolicyRule_1.V1beta1ResourcePolicyRule,
"V1beta1RunAsGroupStrategyOptions": v1beta1RunAsGroupStrategyOptions_1.V1beta1RunAsGroupStrategyOptions,
"V1beta1RunAsUserStrategyOptions": v1beta1RunAsUserStrategyOptions_1.V1beta1RunAsUserStrategyOptions,
"V1beta1RuntimeClass": v1beta1RuntimeClass_1.V1beta1RuntimeClass,
"V1beta1RuntimeClassList": v1beta1RuntimeClassList_1.V1beta1RuntimeClassList,
"V1beta1RuntimeClassStrategyOptions": v1beta1RuntimeClassStrategyOptions_1.V1beta1RuntimeClassStrategyOptions,
"V1beta1SELinuxStrategyOptions": v1beta1SELinuxStrategyOptions_1.V1beta1SELinuxStrategyOptions,
"V1beta1Scheduling": v1beta1Scheduling_1.V1beta1Scheduling,
"V1beta1ServiceAccountSubject": v1beta1ServiceAccountSubject_1.V1beta1ServiceAccountSubject,
"V1beta1Subject": v1beta1Subject_1.V1beta1Subject,
"V1beta1SupplementalGroupsStrategyOptions": v1beta1SupplementalGroupsStrategyOptions_1.V1beta1SupplementalGroupsStrategyOptions,
"V1beta1UserSubject": v1beta1UserSubject_1.V1beta1UserSubject,
"V2beta1ContainerResourceMetricSource": v2beta1ContainerResourceMetricSource_1.V2beta1ContainerResourceMetricSource,
"V2beta1ContainerResourceMetricStatus": v2beta1ContainerResourceMetricStatus_1.V2beta1ContainerResourceMetricStatus,
"V2beta1CrossVersionObjectReference": v2beta1CrossVersionObjectReference_1.V2beta1CrossVersionObjectReference,
"V2beta1ExternalMetricSource": v2beta1ExternalMetricSource_1.V2beta1ExternalMetricSource,
"V2beta1ExternalMetricStatus": v2beta1ExternalMetricStatus_1.V2beta1ExternalMetricStatus,
"V2beta1HorizontalPodAutoscaler": v2beta1HorizontalPodAutoscaler_1.V2beta1HorizontalPodAutoscaler,
"V2beta1HorizontalPodAutoscalerCondition": v2beta1HorizontalPodAutoscalerCondition_1.V2beta1HorizontalPodAutoscalerCondition,
"V2beta1HorizontalPodAutoscalerList": v2beta1HorizontalPodAutoscalerList_1.V2beta1HorizontalPodAutoscalerList,
"V2beta1HorizontalPodAutoscalerSpec": v2beta1HorizontalPodAutoscalerSpec_1.V2beta1HorizontalPodAutoscalerSpec,
"V2beta1HorizontalPodAutoscalerStatus": v2beta1HorizontalPodAutoscalerStatus_1.V2beta1HorizontalPodAutoscalerStatus,
"V2beta1MetricSpec": v2beta1MetricSpec_1.V2beta1MetricSpec,
"V2beta1MetricStatus": v2beta1MetricStatus_1.V2beta1MetricStatus,
"V2beta1ObjectMetricSource": v2beta1ObjectMetricSource_1.V2beta1ObjectMetricSource,
"V2beta1ObjectMetricStatus": v2beta1ObjectMetricStatus_1.V2beta1ObjectMetricStatus,
"V2beta1PodsMetricSource": v2beta1PodsMetricSource_1.V2beta1PodsMetricSource,
"V2beta1PodsMetricStatus": v2beta1PodsMetricStatus_1.V2beta1PodsMetricStatus,
"V2beta1ResourceMetricSource": v2beta1ResourceMetricSource_1.V2beta1ResourceMetricSource,
"V2beta1ResourceMetricStatus": v2beta1ResourceMetricStatus_1.V2beta1ResourceMetricStatus,
"V2beta2ContainerResourceMetricSource": v2beta2ContainerResourceMetricSource_1.V2beta2ContainerResourceMetricSource,
"V2beta2ContainerResourceMetricStatus": v2beta2ContainerResourceMetricStatus_1.V2beta2ContainerResourceMetricStatus,
"V2beta2CrossVersionObjectReference": v2beta2CrossVersionObjectReference_1.V2beta2CrossVersionObjectReference,
"V2beta2ExternalMetricSource": v2beta2ExternalMetricSource_1.V2beta2ExternalMetricSource,
"V2beta2ExternalMetricStatus": v2beta2ExternalMetricStatus_1.V2beta2ExternalMetricStatus,
"V2beta2HPAScalingPolicy": v2beta2HPAScalingPolicy_1.V2beta2HPAScalingPolicy,
"V2beta2HPAScalingRules": v2beta2HPAScalingRules_1.V2beta2HPAScalingRules,
"V2beta2HorizontalPodAutoscaler": v2beta2HorizontalPodAutoscaler_1.V2beta2HorizontalPodAutoscaler,
"V2beta2HorizontalPodAutoscalerBehavior": v2beta2HorizontalPodAutoscalerBehavior_1.V2beta2HorizontalPodAutoscalerBehavior,
"V2beta2HorizontalPodAutoscalerCondition": v2beta2HorizontalPodAutoscalerCondition_1.V2beta2HorizontalPodAutoscalerCondition,
"V2beta2HorizontalPodAutoscalerList": v2beta2HorizontalPodAutoscalerList_1.V2beta2HorizontalPodAutoscalerList,
"V2beta2HorizontalPodAutoscalerSpec": v2beta2HorizontalPodAutoscalerSpec_1.V2beta2HorizontalPodAutoscalerSpec,
"V2beta2HorizontalPodAutoscalerStatus": v2beta2HorizontalPodAutoscalerStatus_1.V2beta2HorizontalPodAutoscalerStatus,
"V2beta2MetricIdentifier": v2beta2MetricIdentifier_1.V2beta2MetricIdentifier,
"V2beta2MetricSpec": v2beta2MetricSpec_1.V2beta2MetricSpec,
"V2beta2MetricStatus": v2beta2MetricStatus_1.V2beta2MetricStatus,
"V2beta2MetricTarget": v2beta2MetricTarget_1.V2beta2MetricTarget,
"V2beta2MetricValueStatus": v2beta2MetricValueStatus_1.V2beta2MetricValueStatus,
"V2beta2ObjectMetricSource": v2beta2ObjectMetricSource_1.V2beta2ObjectMetricSource,
"V2beta2ObjectMetricStatus": v2beta2ObjectMetricStatus_1.V2beta2ObjectMetricStatus,
"V2beta2PodsMetricSource": v2beta2PodsMetricSource_1.V2beta2PodsMetricSource,
"V2beta2PodsMetricStatus": v2beta2PodsMetricStatus_1.V2beta2PodsMetricStatus,
"V2beta2ResourceMetricSource": v2beta2ResourceMetricSource_1.V2beta2ResourceMetricSource,
"V2beta2ResourceMetricStatus": v2beta2ResourceMetricStatus_1.V2beta2ResourceMetricStatus,
"VersionInfo": versionInfo_1.VersionInfo,
};
class ObjectSerializer {
static findCorrectType(data, expectedType) {
if (data == undefined) {
return expectedType;
}
else if (primitives.indexOf(expectedType.toLowerCase()) !== -1) {
return expectedType;
}
else if (expectedType === "Date") {
return expectedType;
}
else {
if (enumsMap[expectedType]) {
return expectedType;
}
if (!typeMap[expectedType]) {
return expectedType; // w/e we don't know the type
}
// Check the discriminator
let discriminatorProperty = typeMap[expectedType].discriminator;
if (discriminatorProperty == null) {
return expectedType; // the type does not have a discriminator. use it.
}
else {
if (data[discriminatorProperty]) {
var discriminatorType = data[discriminatorProperty];
if (typeMap[discriminatorType]) {
return discriminatorType; // use the type given in the discriminator
}
else {
return expectedType; // discriminator did not map to a type
}
}
else {
return expectedType; // discriminator was not present (or an empty string)
}
}
}
}
static serialize(data, type) {
if (data == undefined) {
return data;
}
else if (primitives.indexOf(type.toLowerCase()) !== -1) {
return data;
}
else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6
let subType = type.replace("Array<", ""); // Array => Type>
subType = subType.substring(0, subType.length - 1); // Type> => Type
let transformedData = [];
for (let index = 0; index < data.length; index++) {
let datum = data[index];
transformedData.push(ObjectSerializer.serialize(datum, subType));
}
return transformedData;
}
else if (type === "Date") {
return data.toISOString();
}
else {
if (enumsMap[type]) {
return data;
}
if (!typeMap[type]) { // in case we dont know the type
return data;
}
// Get the actual type of this object
type = this.findCorrectType(data, type);
// get the map for the correct type.
let attributeTypes = typeMap[type].getAttributeTypeMap();
let instance = {};
for (let index = 0; index < attributeTypes.length; index++) {
let attributeType = attributeTypes[index];
instance[attributeType.baseName] = ObjectSerializer.serialize(data[attributeType.name], attributeType.type);
}
return instance;
}
}
static deserialize(data, type) {
// polymorphism may change the actual type.
type = ObjectSerializer.findCorrectType(data, type);
if (data == undefined) {
return data;
}
else if (primitives.indexOf(type.toLowerCase()) !== -1) {
return data;
}
else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6
let subType = type.replace("Array<", ""); // Array => Type>
subType = subType.substring(0, subType.length - 1); // Type> => Type
let transformedData = [];
for (let index = 0; index < data.length; index++) {
let datum = data[index];
transformedData.push(ObjectSerializer.deserialize(datum, subType));
}
return transformedData;
}
else if (type === "Date") {
return new Date(data);
}
else {
if (enumsMap[type]) { // is Enum
return data;
}
if (!typeMap[type]) { // dont know the type
return data;
}
let instance = new typeMap[type]();
let attributeTypes = typeMap[type].getAttributeTypeMap();
for (let index = 0; index < attributeTypes.length; index++) {
let attributeType = attributeTypes[index];
instance[attributeType.name] = ObjectSerializer.deserialize(data[attributeType.baseName], attributeType.type);
}
return instance;
}
}
}
exports.ObjectSerializer = ObjectSerializer;
class HttpBasicAuth {
constructor() {
this.username = '';
this.password = '';
}
applyToRequest(requestOptions) {
requestOptions.auth = {
username: this.username, password: this.password
};
}
}
exports.HttpBasicAuth = HttpBasicAuth;
class HttpBearerAuth {
constructor() {
this.accessToken = '';
}
applyToRequest(requestOptions) {
if (requestOptions && requestOptions.headers) {
const accessToken = typeof this.accessToken === 'function'
? this.accessToken()
: this.accessToken;
requestOptions.headers["Authorization"] = "Bearer " + accessToken;
}
}
}
exports.HttpBearerAuth = HttpBearerAuth;
class ApiKeyAuth {
constructor(location, paramName) {
this.location = location;
this.paramName = paramName;
this.apiKey = '';
}
applyToRequest(requestOptions) {
if (this.location == "query") {
requestOptions.qs[this.paramName] = this.apiKey;
}
else if (this.location == "header" && requestOptions && requestOptions.headers) {
requestOptions.headers[this.paramName] = this.apiKey;
}
else if (this.location == 'cookie' && requestOptions && requestOptions.headers) {
if (requestOptions.headers['Cookie']) {
requestOptions.headers['Cookie'] += '; ' + this.paramName + '=' + encodeURIComponent(this.apiKey);
}
else {
requestOptions.headers['Cookie'] = this.paramName + '=' + encodeURIComponent(this.apiKey);
}
}
}
}
exports.ApiKeyAuth = ApiKeyAuth;
class OAuth {
constructor() {
this.accessToken = '';
}
applyToRequest(requestOptions) {
if (requestOptions && requestOptions.headers) {
requestOptions.headers["Authorization"] = "Bearer " + this.accessToken;
}
}
}
exports.OAuth = OAuth;
class VoidAuth {
constructor() {
this.username = '';
this.password = '';
}
applyToRequest(_) {
// Do nothing
}
}
exports.VoidAuth = VoidAuth;
//# sourceMappingURL=models.js.map
/***/ }),
/***/ 25958:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.StorageV1TokenRequest = void 0;
/**
* TokenRequest contains parameters of a service account token.
*/
class StorageV1TokenRequest {
static getAttributeTypeMap() {
return StorageV1TokenRequest.attributeTypeMap;
}
}
exports.StorageV1TokenRequest = StorageV1TokenRequest;
StorageV1TokenRequest.discriminator = undefined;
StorageV1TokenRequest.attributeTypeMap = [
{
"name": "audience",
"baseName": "audience",
"type": "string"
},
{
"name": "expirationSeconds",
"baseName": "expirationSeconds",
"type": "number"
}
];
//# sourceMappingURL=storageV1TokenRequest.js.map
/***/ }),
/***/ 44481:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1APIGroup = void 0;
/**
* APIGroup contains the name, the supported versions, and the preferred version of a group.
*/
class V1APIGroup {
static getAttributeTypeMap() {
return V1APIGroup.attributeTypeMap;
}
}
exports.V1APIGroup = V1APIGroup;
V1APIGroup.discriminator = undefined;
V1APIGroup.attributeTypeMap = [
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "name",
"baseName": "name",
"type": "string"
},
{
"name": "preferredVersion",
"baseName": "preferredVersion",
"type": "V1GroupVersionForDiscovery"
},
{
"name": "serverAddressByClientCIDRs",
"baseName": "serverAddressByClientCIDRs",
"type": "Array"
},
{
"name": "versions",
"baseName": "versions",
"type": "Array"
}
];
//# sourceMappingURL=v1APIGroup.js.map
/***/ }),
/***/ 52906:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1APIGroupList = void 0;
/**
* APIGroupList is a list of APIGroup, to allow clients to discover the API at /apis.
*/
class V1APIGroupList {
static getAttributeTypeMap() {
return V1APIGroupList.attributeTypeMap;
}
}
exports.V1APIGroupList = V1APIGroupList;
V1APIGroupList.discriminator = undefined;
V1APIGroupList.attributeTypeMap = [
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "groups",
"baseName": "groups",
"type": "Array"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
}
];
//# sourceMappingURL=v1APIGroupList.js.map
/***/ }),
/***/ 89033:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1APIResource = void 0;
/**
* APIResource specifies the name of a resource and whether it is namespaced.
*/
class V1APIResource {
static getAttributeTypeMap() {
return V1APIResource.attributeTypeMap;
}
}
exports.V1APIResource = V1APIResource;
V1APIResource.discriminator = undefined;
V1APIResource.attributeTypeMap = [
{
"name": "categories",
"baseName": "categories",
"type": "Array"
},
{
"name": "group",
"baseName": "group",
"type": "string"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "name",
"baseName": "name",
"type": "string"
},
{
"name": "namespaced",
"baseName": "namespaced",
"type": "boolean"
},
{
"name": "shortNames",
"baseName": "shortNames",
"type": "Array"
},
{
"name": "singularName",
"baseName": "singularName",
"type": "string"
},
{
"name": "storageVersionHash",
"baseName": "storageVersionHash",
"type": "string"
},
{
"name": "verbs",
"baseName": "verbs",
"type": "Array"
},
{
"name": "version",
"baseName": "version",
"type": "string"
}
];
//# sourceMappingURL=v1APIResource.js.map
/***/ }),
/***/ 5454:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1APIResourceList = void 0;
/**
* APIResourceList is a list of APIResource, it is used to expose the name of the resources supported in a specific group and version, and if the resource is namespaced.
*/
class V1APIResourceList {
static getAttributeTypeMap() {
return V1APIResourceList.attributeTypeMap;
}
}
exports.V1APIResourceList = V1APIResourceList;
V1APIResourceList.discriminator = undefined;
V1APIResourceList.attributeTypeMap = [
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "groupVersion",
"baseName": "groupVersion",
"type": "string"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "resources",
"baseName": "resources",
"type": "Array"
}
];
//# sourceMappingURL=v1APIResourceList.js.map
/***/ }),
/***/ 99042:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1APIService = void 0;
/**
* APIService represents a server for a particular GroupVersion. Name must be \"version.group\".
*/
class V1APIService {
static getAttributeTypeMap() {
return V1APIService.attributeTypeMap;
}
}
exports.V1APIService = V1APIService;
V1APIService.discriminator = undefined;
V1APIService.attributeTypeMap = [
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "metadata",
"baseName": "metadata",
"type": "V1ObjectMeta"
},
{
"name": "spec",
"baseName": "spec",
"type": "V1APIServiceSpec"
},
{
"name": "status",
"baseName": "status",
"type": "V1APIServiceStatus"
}
];
//# sourceMappingURL=v1APIService.js.map
/***/ }),
/***/ 58352:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1APIServiceCondition = void 0;
/**
* APIServiceCondition describes the state of an APIService at a particular point
*/
class V1APIServiceCondition {
static getAttributeTypeMap() {
return V1APIServiceCondition.attributeTypeMap;
}
}
exports.V1APIServiceCondition = V1APIServiceCondition;
V1APIServiceCondition.discriminator = undefined;
V1APIServiceCondition.attributeTypeMap = [
{
"name": "lastTransitionTime",
"baseName": "lastTransitionTime",
"type": "Date"
},
{
"name": "message",
"baseName": "message",
"type": "string"
},
{
"name": "reason",
"baseName": "reason",
"type": "string"
},
{
"name": "status",
"baseName": "status",
"type": "string"
},
{
"name": "type",
"baseName": "type",
"type": "string"
}
];
//# sourceMappingURL=v1APIServiceCondition.js.map
/***/ }),
/***/ 87198:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1APIServiceList = void 0;
/**
* APIServiceList is a list of APIService objects.
*/
class V1APIServiceList {
static getAttributeTypeMap() {
return V1APIServiceList.attributeTypeMap;
}
}
exports.V1APIServiceList = V1APIServiceList;
V1APIServiceList.discriminator = undefined;
V1APIServiceList.attributeTypeMap = [
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "items",
"baseName": "items",
"type": "Array"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "metadata",
"baseName": "metadata",
"type": "V1ListMeta"
}
];
//# sourceMappingURL=v1APIServiceList.js.map
/***/ }),
/***/ 61496:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1APIServiceSpec = void 0;
/**
* APIServiceSpec contains information for locating and communicating with a server. Only https is supported, though you are able to disable certificate verification.
*/
class V1APIServiceSpec {
static getAttributeTypeMap() {
return V1APIServiceSpec.attributeTypeMap;
}
}
exports.V1APIServiceSpec = V1APIServiceSpec;
V1APIServiceSpec.discriminator = undefined;
V1APIServiceSpec.attributeTypeMap = [
{
"name": "caBundle",
"baseName": "caBundle",
"type": "string"
},
{
"name": "group",
"baseName": "group",
"type": "string"
},
{
"name": "groupPriorityMinimum",
"baseName": "groupPriorityMinimum",
"type": "number"
},
{
"name": "insecureSkipTLSVerify",
"baseName": "insecureSkipTLSVerify",
"type": "boolean"
},
{
"name": "service",
"baseName": "service",
"type": "ApiregistrationV1ServiceReference"
},
{
"name": "version",
"baseName": "version",
"type": "string"
},
{
"name": "versionPriority",
"baseName": "versionPriority",
"type": "number"
}
];
//# sourceMappingURL=v1APIServiceSpec.js.map
/***/ }),
/***/ 17883:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1APIServiceStatus = void 0;
/**
* APIServiceStatus contains derived information about an API server
*/
class V1APIServiceStatus {
static getAttributeTypeMap() {
return V1APIServiceStatus.attributeTypeMap;
}
}
exports.V1APIServiceStatus = V1APIServiceStatus;
V1APIServiceStatus.discriminator = undefined;
V1APIServiceStatus.attributeTypeMap = [
{
"name": "conditions",
"baseName": "conditions",
"type": "Array"
}
];
//# sourceMappingURL=v1APIServiceStatus.js.map
/***/ }),
/***/ 93135:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1APIVersions = void 0;
/**
* APIVersions lists the versions that are available, to allow clients to discover the API at /api, which is the root path of the legacy v1 API.
*/
class V1APIVersions {
static getAttributeTypeMap() {
return V1APIVersions.attributeTypeMap;
}
}
exports.V1APIVersions = V1APIVersions;
V1APIVersions.discriminator = undefined;
V1APIVersions.attributeTypeMap = [
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "serverAddressByClientCIDRs",
"baseName": "serverAddressByClientCIDRs",
"type": "Array"
},
{
"name": "versions",
"baseName": "versions",
"type": "Array"
}
];
//# sourceMappingURL=v1APIVersions.js.map
/***/ }),
/***/ 39808:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1AWSElasticBlockStoreVolumeSource = void 0;
/**
* Represents a Persistent Disk resource in AWS. An AWS EBS disk must exist before mounting to a container. The disk must also be in the same AWS zone as the kubelet. An AWS EBS disk can only be mounted as read/write once. AWS EBS volumes support ownership management and SELinux relabeling.
*/
class V1AWSElasticBlockStoreVolumeSource {
static getAttributeTypeMap() {
return V1AWSElasticBlockStoreVolumeSource.attributeTypeMap;
}
}
exports.V1AWSElasticBlockStoreVolumeSource = V1AWSElasticBlockStoreVolumeSource;
V1AWSElasticBlockStoreVolumeSource.discriminator = undefined;
V1AWSElasticBlockStoreVolumeSource.attributeTypeMap = [
{
"name": "fsType",
"baseName": "fsType",
"type": "string"
},
{
"name": "partition",
"baseName": "partition",
"type": "number"
},
{
"name": "readOnly",
"baseName": "readOnly",
"type": "boolean"
},
{
"name": "volumeID",
"baseName": "volumeID",
"type": "string"
}
];
//# sourceMappingURL=v1AWSElasticBlockStoreVolumeSource.js.map
/***/ }),
/***/ 61957:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1Affinity = void 0;
/**
* Affinity is a group of affinity scheduling rules.
*/
class V1Affinity {
static getAttributeTypeMap() {
return V1Affinity.attributeTypeMap;
}
}
exports.V1Affinity = V1Affinity;
V1Affinity.discriminator = undefined;
V1Affinity.attributeTypeMap = [
{
"name": "nodeAffinity",
"baseName": "nodeAffinity",
"type": "V1NodeAffinity"
},
{
"name": "podAffinity",
"baseName": "podAffinity",
"type": "V1PodAffinity"
},
{
"name": "podAntiAffinity",
"baseName": "podAntiAffinity",
"type": "V1PodAntiAffinity"
}
];
//# sourceMappingURL=v1Affinity.js.map
/***/ }),
/***/ 90312:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1AggregationRule = void 0;
/**
* AggregationRule describes how to locate ClusterRoles to aggregate into the ClusterRole
*/
class V1AggregationRule {
static getAttributeTypeMap() {
return V1AggregationRule.attributeTypeMap;
}
}
exports.V1AggregationRule = V1AggregationRule;
V1AggregationRule.discriminator = undefined;
V1AggregationRule.attributeTypeMap = [
{
"name": "clusterRoleSelectors",
"baseName": "clusterRoleSelectors",
"type": "Array"
}
];
//# sourceMappingURL=v1AggregationRule.js.map
/***/ }),
/***/ 97069:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1AttachedVolume = void 0;
/**
* AttachedVolume describes a volume attached to a node
*/
class V1AttachedVolume {
static getAttributeTypeMap() {
return V1AttachedVolume.attributeTypeMap;
}
}
exports.V1AttachedVolume = V1AttachedVolume;
V1AttachedVolume.discriminator = undefined;
V1AttachedVolume.attributeTypeMap = [
{
"name": "devicePath",
"baseName": "devicePath",
"type": "string"
},
{
"name": "name",
"baseName": "name",
"type": "string"
}
];
//# sourceMappingURL=v1AttachedVolume.js.map
/***/ }),
/***/ 91312:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1AzureDiskVolumeSource = void 0;
/**
* AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.
*/
class V1AzureDiskVolumeSource {
static getAttributeTypeMap() {
return V1AzureDiskVolumeSource.attributeTypeMap;
}
}
exports.V1AzureDiskVolumeSource = V1AzureDiskVolumeSource;
V1AzureDiskVolumeSource.discriminator = undefined;
V1AzureDiskVolumeSource.attributeTypeMap = [
{
"name": "cachingMode",
"baseName": "cachingMode",
"type": "string"
},
{
"name": "diskName",
"baseName": "diskName",
"type": "string"
},
{
"name": "diskURI",
"baseName": "diskURI",
"type": "string"
},
{
"name": "fsType",
"baseName": "fsType",
"type": "string"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "readOnly",
"baseName": "readOnly",
"type": "boolean"
}
];
//# sourceMappingURL=v1AzureDiskVolumeSource.js.map
/***/ }),
/***/ 6336:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1AzureFilePersistentVolumeSource = void 0;
/**
* AzureFile represents an Azure File Service mount on the host and bind mount to the pod.
*/
class V1AzureFilePersistentVolumeSource {
static getAttributeTypeMap() {
return V1AzureFilePersistentVolumeSource.attributeTypeMap;
}
}
exports.V1AzureFilePersistentVolumeSource = V1AzureFilePersistentVolumeSource;
V1AzureFilePersistentVolumeSource.discriminator = undefined;
V1AzureFilePersistentVolumeSource.attributeTypeMap = [
{
"name": "readOnly",
"baseName": "readOnly",
"type": "boolean"
},
{
"name": "secretName",
"baseName": "secretName",
"type": "string"
},
{
"name": "secretNamespace",
"baseName": "secretNamespace",
"type": "string"
},
{
"name": "shareName",
"baseName": "shareName",
"type": "string"
}
];
//# sourceMappingURL=v1AzureFilePersistentVolumeSource.js.map
/***/ }),
/***/ 95073:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1AzureFileVolumeSource = void 0;
/**
* AzureFile represents an Azure File Service mount on the host and bind mount to the pod.
*/
class V1AzureFileVolumeSource {
static getAttributeTypeMap() {
return V1AzureFileVolumeSource.attributeTypeMap;
}
}
exports.V1AzureFileVolumeSource = V1AzureFileVolumeSource;
V1AzureFileVolumeSource.discriminator = undefined;
V1AzureFileVolumeSource.attributeTypeMap = [
{
"name": "readOnly",
"baseName": "readOnly",
"type": "boolean"
},
{
"name": "secretName",
"baseName": "secretName",
"type": "string"
},
{
"name": "shareName",
"baseName": "shareName",
"type": "string"
}
];
//# sourceMappingURL=v1AzureFileVolumeSource.js.map
/***/ }),
/***/ 48551:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1Binding = void 0;
/**
* Binding ties one object to another; for example, a pod is bound to a node by a scheduler. Deprecated in 1.7, please use the bindings subresource of pods instead.
*/
class V1Binding {
static getAttributeTypeMap() {
return V1Binding.attributeTypeMap;
}
}
exports.V1Binding = V1Binding;
V1Binding.discriminator = undefined;
V1Binding.attributeTypeMap = [
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "metadata",
"baseName": "metadata",
"type": "V1ObjectMeta"
},
{
"name": "target",
"baseName": "target",
"type": "V1ObjectReference"
}
];
//# sourceMappingURL=v1Binding.js.map
/***/ }),
/***/ 68849:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1BoundObjectReference = void 0;
/**
* BoundObjectReference is a reference to an object that a token is bound to.
*/
class V1BoundObjectReference {
static getAttributeTypeMap() {
return V1BoundObjectReference.attributeTypeMap;
}
}
exports.V1BoundObjectReference = V1BoundObjectReference;
V1BoundObjectReference.discriminator = undefined;
V1BoundObjectReference.attributeTypeMap = [
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "name",
"baseName": "name",
"type": "string"
},
{
"name": "uid",
"baseName": "uid",
"type": "string"
}
];
//# sourceMappingURL=v1BoundObjectReference.js.map
/***/ }),
/***/ 34144:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1CSIDriver = void 0;
/**
* CSIDriver captures information about a Container Storage Interface (CSI) volume driver deployed on the cluster. Kubernetes attach detach controller uses this object to determine whether attach is required. Kubelet uses this object to determine whether pod information needs to be passed on mount. CSIDriver objects are non-namespaced.
*/
class V1CSIDriver {
static getAttributeTypeMap() {
return V1CSIDriver.attributeTypeMap;
}
}
exports.V1CSIDriver = V1CSIDriver;
V1CSIDriver.discriminator = undefined;
V1CSIDriver.attributeTypeMap = [
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "metadata",
"baseName": "metadata",
"type": "V1ObjectMeta"
},
{
"name": "spec",
"baseName": "spec",
"type": "V1CSIDriverSpec"
}
];
//# sourceMappingURL=v1CSIDriver.js.map
/***/ }),
/***/ 84881:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1CSIDriverList = void 0;
/**
* CSIDriverList is a collection of CSIDriver objects.
*/
class V1CSIDriverList {
static getAttributeTypeMap() {
return V1CSIDriverList.attributeTypeMap;
}
}
exports.V1CSIDriverList = V1CSIDriverList;
V1CSIDriverList.discriminator = undefined;
V1CSIDriverList.attributeTypeMap = [
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "items",
"baseName": "items",
"type": "Array"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "metadata",
"baseName": "metadata",
"type": "V1ListMeta"
}
];
//# sourceMappingURL=v1CSIDriverList.js.map
/***/ }),
/***/ 11582:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1CSIDriverSpec = void 0;
/**
* CSIDriverSpec is the specification of a CSIDriver.
*/
class V1CSIDriverSpec {
static getAttributeTypeMap() {
return V1CSIDriverSpec.attributeTypeMap;
}
}
exports.V1CSIDriverSpec = V1CSIDriverSpec;
V1CSIDriverSpec.discriminator = undefined;
V1CSIDriverSpec.attributeTypeMap = [
{
"name": "attachRequired",
"baseName": "attachRequired",
"type": "boolean"
},
{
"name": "fsGroupPolicy",
"baseName": "fsGroupPolicy",
"type": "string"
},
{
"name": "podInfoOnMount",
"baseName": "podInfoOnMount",
"type": "boolean"
},
{
"name": "requiresRepublish",
"baseName": "requiresRepublish",
"type": "boolean"
},
{
"name": "storageCapacity",
"baseName": "storageCapacity",
"type": "boolean"
},
{
"name": "tokenRequests",
"baseName": "tokenRequests",
"type": "Array"
},
{
"name": "volumeLifecycleModes",
"baseName": "volumeLifecycleModes",
"type": "Array"
}
];
//# sourceMappingURL=v1CSIDriverSpec.js.map
/***/ }),
/***/ 74315:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1CSINode = void 0;
/**
* CSINode holds information about all CSI drivers installed on a node. CSI drivers do not need to create the CSINode object directly. As long as they use the node-driver-registrar sidecar container, the kubelet will automatically populate the CSINode object for the CSI driver as part of kubelet plugin registration. CSINode has the same name as a node. If the object is missing, it means either there are no CSI Drivers available on the node, or the Kubelet version is low enough that it doesn\'t create this object. CSINode has an OwnerReference that points to the corresponding node object.
*/
class V1CSINode {
static getAttributeTypeMap() {
return V1CSINode.attributeTypeMap;
}
}
exports.V1CSINode = V1CSINode;
V1CSINode.discriminator = undefined;
V1CSINode.attributeTypeMap = [
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "metadata",
"baseName": "metadata",
"type": "V1ObjectMeta"
},
{
"name": "spec",
"baseName": "spec",
"type": "V1CSINodeSpec"
}
];
//# sourceMappingURL=v1CSINode.js.map
/***/ }),
/***/ 90288:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1CSINodeDriver = void 0;
/**
* CSINodeDriver holds information about the specification of one CSI driver installed on a node
*/
class V1CSINodeDriver {
static getAttributeTypeMap() {
return V1CSINodeDriver.attributeTypeMap;
}
}
exports.V1CSINodeDriver = V1CSINodeDriver;
V1CSINodeDriver.discriminator = undefined;
V1CSINodeDriver.attributeTypeMap = [
{
"name": "allocatable",
"baseName": "allocatable",
"type": "V1VolumeNodeResources"
},
{
"name": "name",
"baseName": "name",
"type": "string"
},
{
"name": "nodeID",
"baseName": "nodeID",
"type": "string"
},
{
"name": "topologyKeys",
"baseName": "topologyKeys",
"type": "Array"
}
];
//# sourceMappingURL=v1CSINodeDriver.js.map
/***/ }),
/***/ 24000:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1CSINodeList = void 0;
/**
* CSINodeList is a collection of CSINode objects.
*/
class V1CSINodeList {
static getAttributeTypeMap() {
return V1CSINodeList.attributeTypeMap;
}
}
exports.V1CSINodeList = V1CSINodeList;
V1CSINodeList.discriminator = undefined;
V1CSINodeList.attributeTypeMap = [
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "items",
"baseName": "items",
"type": "Array"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "metadata",
"baseName": "metadata",
"type": "V1ListMeta"
}
];
//# sourceMappingURL=v1CSINodeList.js.map
/***/ }),
/***/ 75636:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1CSINodeSpec = void 0;
/**
* CSINodeSpec holds information about the specification of all CSI drivers installed on a node
*/
class V1CSINodeSpec {
static getAttributeTypeMap() {
return V1CSINodeSpec.attributeTypeMap;
}
}
exports.V1CSINodeSpec = V1CSINodeSpec;
V1CSINodeSpec.discriminator = undefined;
V1CSINodeSpec.attributeTypeMap = [
{
"name": "drivers",
"baseName": "drivers",
"type": "Array"
}
];
//# sourceMappingURL=v1CSINodeSpec.js.map
/***/ }),
/***/ 98367:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1CSIPersistentVolumeSource = void 0;
/**
* Represents storage that is managed by an external CSI volume driver (Beta feature)
*/
class V1CSIPersistentVolumeSource {
static getAttributeTypeMap() {
return V1CSIPersistentVolumeSource.attributeTypeMap;
}
}
exports.V1CSIPersistentVolumeSource = V1CSIPersistentVolumeSource;
V1CSIPersistentVolumeSource.discriminator = undefined;
V1CSIPersistentVolumeSource.attributeTypeMap = [
{
"name": "controllerExpandSecretRef",
"baseName": "controllerExpandSecretRef",
"type": "V1SecretReference"
},
{
"name": "controllerPublishSecretRef",
"baseName": "controllerPublishSecretRef",
"type": "V1SecretReference"
},
{
"name": "driver",
"baseName": "driver",
"type": "string"
},
{
"name": "fsType",
"baseName": "fsType",
"type": "string"
},
{
"name": "nodePublishSecretRef",
"baseName": "nodePublishSecretRef",
"type": "V1SecretReference"
},
{
"name": "nodeStageSecretRef",
"baseName": "nodeStageSecretRef",
"type": "V1SecretReference"
},
{
"name": "readOnly",
"baseName": "readOnly",
"type": "boolean"
},
{
"name": "volumeAttributes",
"baseName": "volumeAttributes",
"type": "{ [key: string]: string; }"
},
{
"name": "volumeHandle",
"baseName": "volumeHandle",
"type": "string"
}
];
//# sourceMappingURL=v1CSIPersistentVolumeSource.js.map
/***/ }),
/***/ 87598:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1CSIVolumeSource = void 0;
/**
* Represents a source location of a volume to mount, managed by an external CSI driver
*/
class V1CSIVolumeSource {
static getAttributeTypeMap() {
return V1CSIVolumeSource.attributeTypeMap;
}
}
exports.V1CSIVolumeSource = V1CSIVolumeSource;
V1CSIVolumeSource.discriminator = undefined;
V1CSIVolumeSource.attributeTypeMap = [
{
"name": "driver",
"baseName": "driver",
"type": "string"
},
{
"name": "fsType",
"baseName": "fsType",
"type": "string"
},
{
"name": "nodePublishSecretRef",
"baseName": "nodePublishSecretRef",
"type": "V1LocalObjectReference"
},
{
"name": "readOnly",
"baseName": "readOnly",
"type": "boolean"
},
{
"name": "volumeAttributes",
"baseName": "volumeAttributes",
"type": "{ [key: string]: string; }"
}
];
//# sourceMappingURL=v1CSIVolumeSource.js.map
/***/ }),
/***/ 82975:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1Capabilities = void 0;
/**
* Adds and removes POSIX capabilities from running containers.
*/
class V1Capabilities {
static getAttributeTypeMap() {
return V1Capabilities.attributeTypeMap;
}
}
exports.V1Capabilities = V1Capabilities;
V1Capabilities.discriminator = undefined;
V1Capabilities.attributeTypeMap = [
{
"name": "add",
"baseName": "add",
"type": "Array"
},
{
"name": "drop",
"baseName": "drop",
"type": "Array"
}
];
//# sourceMappingURL=v1Capabilities.js.map
/***/ }),
/***/ 14268:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1CephFSPersistentVolumeSource = void 0;
/**
* Represents a Ceph Filesystem mount that lasts the lifetime of a pod Cephfs volumes do not support ownership management or SELinux relabeling.
*/
class V1CephFSPersistentVolumeSource {
static getAttributeTypeMap() {
return V1CephFSPersistentVolumeSource.attributeTypeMap;
}
}
exports.V1CephFSPersistentVolumeSource = V1CephFSPersistentVolumeSource;
V1CephFSPersistentVolumeSource.discriminator = undefined;
V1CephFSPersistentVolumeSource.attributeTypeMap = [
{
"name": "monitors",
"baseName": "monitors",
"type": "Array"
},
{
"name": "path",
"baseName": "path",
"type": "string"
},
{
"name": "readOnly",
"baseName": "readOnly",
"type": "boolean"
},
{
"name": "secretFile",
"baseName": "secretFile",
"type": "string"
},
{
"name": "secretRef",
"baseName": "secretRef",
"type": "V1SecretReference"
},
{
"name": "user",
"baseName": "user",
"type": "string"
}
];
//# sourceMappingURL=v1CephFSPersistentVolumeSource.js.map
/***/ }),
/***/ 84957:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1CephFSVolumeSource = void 0;
/**
* Represents a Ceph Filesystem mount that lasts the lifetime of a pod Cephfs volumes do not support ownership management or SELinux relabeling.
*/
class V1CephFSVolumeSource {
static getAttributeTypeMap() {
return V1CephFSVolumeSource.attributeTypeMap;
}
}
exports.V1CephFSVolumeSource = V1CephFSVolumeSource;
V1CephFSVolumeSource.discriminator = undefined;
V1CephFSVolumeSource.attributeTypeMap = [
{
"name": "monitors",
"baseName": "monitors",
"type": "Array"
},
{
"name": "path",
"baseName": "path",
"type": "string"
},
{
"name": "readOnly",
"baseName": "readOnly",
"type": "boolean"
},
{
"name": "secretFile",
"baseName": "secretFile",
"type": "string"
},
{
"name": "secretRef",
"baseName": "secretRef",
"type": "V1LocalObjectReference"
},
{
"name": "user",
"baseName": "user",
"type": "string"
}
];
//# sourceMappingURL=v1CephFSVolumeSource.js.map
/***/ }),
/***/ 99084:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1CertificateSigningRequest = void 0;
/**
* CertificateSigningRequest objects provide a mechanism to obtain x509 certificates by submitting a certificate signing request, and having it asynchronously approved and issued. Kubelets use this API to obtain: 1. client certificates to authenticate to kube-apiserver (with the \"kubernetes.io/kube-apiserver-client-kubelet\" signerName). 2. serving certificates for TLS endpoints kube-apiserver can connect to securely (with the \"kubernetes.io/kubelet-serving\" signerName). This API can be used to request client certificates to authenticate to kube-apiserver (with the \"kubernetes.io/kube-apiserver-client\" signerName), or to obtain certificates from custom non-Kubernetes signers.
*/
class V1CertificateSigningRequest {
static getAttributeTypeMap() {
return V1CertificateSigningRequest.attributeTypeMap;
}
}
exports.V1CertificateSigningRequest = V1CertificateSigningRequest;
V1CertificateSigningRequest.discriminator = undefined;
V1CertificateSigningRequest.attributeTypeMap = [
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "metadata",
"baseName": "metadata",
"type": "V1ObjectMeta"
},
{
"name": "spec",
"baseName": "spec",
"type": "V1CertificateSigningRequestSpec"
},
{
"name": "status",
"baseName": "status",
"type": "V1CertificateSigningRequestStatus"
}
];
//# sourceMappingURL=v1CertificateSigningRequest.js.map
/***/ }),
/***/ 92932:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1CertificateSigningRequestCondition = void 0;
/**
* CertificateSigningRequestCondition describes a condition of a CertificateSigningRequest object
*/
class V1CertificateSigningRequestCondition {
static getAttributeTypeMap() {
return V1CertificateSigningRequestCondition.attributeTypeMap;
}
}
exports.V1CertificateSigningRequestCondition = V1CertificateSigningRequestCondition;
V1CertificateSigningRequestCondition.discriminator = undefined;
V1CertificateSigningRequestCondition.attributeTypeMap = [
{
"name": "lastTransitionTime",
"baseName": "lastTransitionTime",
"type": "Date"
},
{
"name": "lastUpdateTime",
"baseName": "lastUpdateTime",
"type": "Date"
},
{
"name": "message",
"baseName": "message",
"type": "string"
},
{
"name": "reason",
"baseName": "reason",
"type": "string"
},
{
"name": "status",
"baseName": "status",
"type": "string"
},
{
"name": "type",
"baseName": "type",
"type": "string"
}
];
//# sourceMappingURL=v1CertificateSigningRequestCondition.js.map
/***/ }),
/***/ 31530:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1CertificateSigningRequestList = void 0;
/**
* CertificateSigningRequestList is a collection of CertificateSigningRequest objects
*/
class V1CertificateSigningRequestList {
static getAttributeTypeMap() {
return V1CertificateSigningRequestList.attributeTypeMap;
}
}
exports.V1CertificateSigningRequestList = V1CertificateSigningRequestList;
V1CertificateSigningRequestList.discriminator = undefined;
V1CertificateSigningRequestList.attributeTypeMap = [
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "items",
"baseName": "items",
"type": "Array"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "metadata",
"baseName": "metadata",
"type": "V1ListMeta"
}
];
//# sourceMappingURL=v1CertificateSigningRequestList.js.map
/***/ }),
/***/ 37759:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1CertificateSigningRequestSpec = void 0;
/**
* CertificateSigningRequestSpec contains the certificate request.
*/
class V1CertificateSigningRequestSpec {
static getAttributeTypeMap() {
return V1CertificateSigningRequestSpec.attributeTypeMap;
}
}
exports.V1CertificateSigningRequestSpec = V1CertificateSigningRequestSpec;
V1CertificateSigningRequestSpec.discriminator = undefined;
V1CertificateSigningRequestSpec.attributeTypeMap = [
{
"name": "expirationSeconds",
"baseName": "expirationSeconds",
"type": "number"
},
{
"name": "extra",
"baseName": "extra",
"type": "{ [key: string]: Array; }"
},
{
"name": "groups",
"baseName": "groups",
"type": "Array"
},
{
"name": "request",
"baseName": "request",
"type": "string"
},
{
"name": "signerName",
"baseName": "signerName",
"type": "string"
},
{
"name": "uid",
"baseName": "uid",
"type": "string"
},
{
"name": "usages",
"baseName": "usages",
"type": "Array"
},
{
"name": "username",
"baseName": "username",
"type": "string"
}
];
//# sourceMappingURL=v1CertificateSigningRequestSpec.js.map
/***/ }),
/***/ 38285:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1CertificateSigningRequestStatus = void 0;
/**
* CertificateSigningRequestStatus contains conditions used to indicate approved/denied/failed status of the request, and the issued certificate.
*/
class V1CertificateSigningRequestStatus {
static getAttributeTypeMap() {
return V1CertificateSigningRequestStatus.attributeTypeMap;
}
}
exports.V1CertificateSigningRequestStatus = V1CertificateSigningRequestStatus;
V1CertificateSigningRequestStatus.discriminator = undefined;
V1CertificateSigningRequestStatus.attributeTypeMap = [
{
"name": "certificate",
"baseName": "certificate",
"type": "string"
},
{
"name": "conditions",
"baseName": "conditions",
"type": "Array"
}
];
//# sourceMappingURL=v1CertificateSigningRequestStatus.js.map
/***/ }),
/***/ 41888:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1CinderPersistentVolumeSource = void 0;
/**
* Represents a cinder volume resource in Openstack. A Cinder volume must exist before mounting to a container. The volume must also be in the same region as the kubelet. Cinder volumes support ownership management and SELinux relabeling.
*/
class V1CinderPersistentVolumeSource {
static getAttributeTypeMap() {
return V1CinderPersistentVolumeSource.attributeTypeMap;
}
}
exports.V1CinderPersistentVolumeSource = V1CinderPersistentVolumeSource;
V1CinderPersistentVolumeSource.discriminator = undefined;
V1CinderPersistentVolumeSource.attributeTypeMap = [
{
"name": "fsType",
"baseName": "fsType",
"type": "string"
},
{
"name": "readOnly",
"baseName": "readOnly",
"type": "boolean"
},
{
"name": "secretRef",
"baseName": "secretRef",
"type": "V1SecretReference"
},
{
"name": "volumeID",
"baseName": "volumeID",
"type": "string"
}
];
//# sourceMappingURL=v1CinderPersistentVolumeSource.js.map
/***/ }),
/***/ 19111:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1CinderVolumeSource = void 0;
/**
* Represents a cinder volume resource in Openstack. A Cinder volume must exist before mounting to a container. The volume must also be in the same region as the kubelet. Cinder volumes support ownership management and SELinux relabeling.
*/
class V1CinderVolumeSource {
static getAttributeTypeMap() {
return V1CinderVolumeSource.attributeTypeMap;
}
}
exports.V1CinderVolumeSource = V1CinderVolumeSource;
V1CinderVolumeSource.discriminator = undefined;
V1CinderVolumeSource.attributeTypeMap = [
{
"name": "fsType",
"baseName": "fsType",
"type": "string"
},
{
"name": "readOnly",
"baseName": "readOnly",
"type": "boolean"
},
{
"name": "secretRef",
"baseName": "secretRef",
"type": "V1LocalObjectReference"
},
{
"name": "volumeID",
"baseName": "volumeID",
"type": "string"
}
];
//# sourceMappingURL=v1CinderVolumeSource.js.map
/***/ }),
/***/ 33913:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1ClientIPConfig = void 0;
/**
* ClientIPConfig represents the configurations of Client IP based session affinity.
*/
class V1ClientIPConfig {
static getAttributeTypeMap() {
return V1ClientIPConfig.attributeTypeMap;
}
}
exports.V1ClientIPConfig = V1ClientIPConfig;
V1ClientIPConfig.discriminator = undefined;
V1ClientIPConfig.attributeTypeMap = [
{
"name": "timeoutSeconds",
"baseName": "timeoutSeconds",
"type": "number"
}
];
//# sourceMappingURL=v1ClientIPConfig.js.map
/***/ }),
/***/ 61458:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1ClusterRole = void 0;
/**
* ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding.
*/
class V1ClusterRole {
static getAttributeTypeMap() {
return V1ClusterRole.attributeTypeMap;
}
}
exports.V1ClusterRole = V1ClusterRole;
V1ClusterRole.discriminator = undefined;
V1ClusterRole.attributeTypeMap = [
{
"name": "aggregationRule",
"baseName": "aggregationRule",
"type": "V1AggregationRule"
},
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "metadata",
"baseName": "metadata",
"type": "V1ObjectMeta"
},
{
"name": "rules",
"baseName": "rules",
"type": "Array"
}
];
//# sourceMappingURL=v1ClusterRole.js.map
/***/ }),
/***/ 32315:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1ClusterRoleBinding = void 0;
/**
* ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, and adds who information via Subject.
*/
class V1ClusterRoleBinding {
static getAttributeTypeMap() {
return V1ClusterRoleBinding.attributeTypeMap;
}
}
exports.V1ClusterRoleBinding = V1ClusterRoleBinding;
V1ClusterRoleBinding.discriminator = undefined;
V1ClusterRoleBinding.attributeTypeMap = [
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "metadata",
"baseName": "metadata",
"type": "V1ObjectMeta"
},
{
"name": "roleRef",
"baseName": "roleRef",
"type": "V1RoleRef"
},
{
"name": "subjects",
"baseName": "subjects",
"type": "Array"
}
];
//# sourceMappingURL=v1ClusterRoleBinding.js.map
/***/ }),
/***/ 21181:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1ClusterRoleBindingList = void 0;
/**
* ClusterRoleBindingList is a collection of ClusterRoleBindings
*/
class V1ClusterRoleBindingList {
static getAttributeTypeMap() {
return V1ClusterRoleBindingList.attributeTypeMap;
}
}
exports.V1ClusterRoleBindingList = V1ClusterRoleBindingList;
V1ClusterRoleBindingList.discriminator = undefined;
V1ClusterRoleBindingList.attributeTypeMap = [
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "items",
"baseName": "items",
"type": "Array"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "metadata",
"baseName": "metadata",
"type": "V1ListMeta"
}
];
//# sourceMappingURL=v1ClusterRoleBindingList.js.map
/***/ }),
/***/ 95532:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1ClusterRoleList = void 0;
/**
* ClusterRoleList is a collection of ClusterRoles
*/
class V1ClusterRoleList {
static getAttributeTypeMap() {
return V1ClusterRoleList.attributeTypeMap;
}
}
exports.V1ClusterRoleList = V1ClusterRoleList;
V1ClusterRoleList.discriminator = undefined;
V1ClusterRoleList.attributeTypeMap = [
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "items",
"baseName": "items",
"type": "Array"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "metadata",
"baseName": "metadata",
"type": "V1ListMeta"
}
];
//# sourceMappingURL=v1ClusterRoleList.js.map
/***/ }),
/***/ 30578:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1ComponentCondition = void 0;
/**
* Information about the condition of a component.
*/
class V1ComponentCondition {
static getAttributeTypeMap() {
return V1ComponentCondition.attributeTypeMap;
}
}
exports.V1ComponentCondition = V1ComponentCondition;
V1ComponentCondition.discriminator = undefined;
V1ComponentCondition.attributeTypeMap = [
{
"name": "error",
"baseName": "error",
"type": "string"
},
{
"name": "message",
"baseName": "message",
"type": "string"
},
{
"name": "status",
"baseName": "status",
"type": "string"
},
{
"name": "type",
"baseName": "type",
"type": "string"
}
];
//# sourceMappingURL=v1ComponentCondition.js.map
/***/ }),
/***/ 2047:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1ComponentStatus = void 0;
/**
* ComponentStatus (and ComponentStatusList) holds the cluster validation info. Deprecated: This API is deprecated in v1.19+
*/
class V1ComponentStatus {
static getAttributeTypeMap() {
return V1ComponentStatus.attributeTypeMap;
}
}
exports.V1ComponentStatus = V1ComponentStatus;
V1ComponentStatus.discriminator = undefined;
V1ComponentStatus.attributeTypeMap = [
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "conditions",
"baseName": "conditions",
"type": "Array"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "metadata",
"baseName": "metadata",
"type": "V1ObjectMeta"
}
];
//# sourceMappingURL=v1ComponentStatus.js.map
/***/ }),
/***/ 38596:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1ComponentStatusList = void 0;
/**
* Status of all the conditions for the component as a list of ComponentStatus objects. Deprecated: This API is deprecated in v1.19+
*/
class V1ComponentStatusList {
static getAttributeTypeMap() {
return V1ComponentStatusList.attributeTypeMap;
}
}
exports.V1ComponentStatusList = V1ComponentStatusList;
V1ComponentStatusList.discriminator = undefined;
V1ComponentStatusList.attributeTypeMap = [
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "items",
"baseName": "items",
"type": "Array"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "metadata",
"baseName": "metadata",
"type": "V1ListMeta"
}
];
//# sourceMappingURL=v1ComponentStatusList.js.map
/***/ }),
/***/ 34990:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1Condition = void 0;
/**
* Condition contains details for one aspect of the current state of this API Resource.
*/
class V1Condition {
static getAttributeTypeMap() {
return V1Condition.attributeTypeMap;
}
}
exports.V1Condition = V1Condition;
V1Condition.discriminator = undefined;
V1Condition.attributeTypeMap = [
{
"name": "lastTransitionTime",
"baseName": "lastTransitionTime",
"type": "Date"
},
{
"name": "message",
"baseName": "message",
"type": "string"
},
{
"name": "observedGeneration",
"baseName": "observedGeneration",
"type": "number"
},
{
"name": "reason",
"baseName": "reason",
"type": "string"
},
{
"name": "status",
"baseName": "status",
"type": "string"
},
{
"name": "type",
"baseName": "type",
"type": "string"
}
];
//# sourceMappingURL=v1Condition.js.map
/***/ }),
/***/ 42874:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1ConfigMap = void 0;
/**
* ConfigMap holds configuration data for pods to consume.
*/
class V1ConfigMap {
static getAttributeTypeMap() {
return V1ConfigMap.attributeTypeMap;
}
}
exports.V1ConfigMap = V1ConfigMap;
V1ConfigMap.discriminator = undefined;
V1ConfigMap.attributeTypeMap = [
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "binaryData",
"baseName": "binaryData",
"type": "{ [key: string]: string; }"
},
{
"name": "data",
"baseName": "data",
"type": "{ [key: string]: string; }"
},
{
"name": "immutable",
"baseName": "immutable",
"type": "boolean"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "metadata",
"baseName": "metadata",
"type": "V1ObjectMeta"
}
];
//# sourceMappingURL=v1ConfigMap.js.map
/***/ }),
/***/ 99685:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1ConfigMapEnvSource = void 0;
/**
* ConfigMapEnvSource selects a ConfigMap to populate the environment variables with. The contents of the target ConfigMap\'s Data field will represent the key-value pairs as environment variables.
*/
class V1ConfigMapEnvSource {
static getAttributeTypeMap() {
return V1ConfigMapEnvSource.attributeTypeMap;
}
}
exports.V1ConfigMapEnvSource = V1ConfigMapEnvSource;
V1ConfigMapEnvSource.discriminator = undefined;
V1ConfigMapEnvSource.attributeTypeMap = [
{
"name": "name",
"baseName": "name",
"type": "string"
},
{
"name": "optional",
"baseName": "optional",
"type": "boolean"
}
];
//# sourceMappingURL=v1ConfigMapEnvSource.js.map
/***/ }),
/***/ 62892:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1ConfigMapKeySelector = void 0;
/**
* Selects a key from a ConfigMap.
*/
class V1ConfigMapKeySelector {
static getAttributeTypeMap() {
return V1ConfigMapKeySelector.attributeTypeMap;
}
}
exports.V1ConfigMapKeySelector = V1ConfigMapKeySelector;
V1ConfigMapKeySelector.discriminator = undefined;
V1ConfigMapKeySelector.attributeTypeMap = [
{
"name": "key",
"baseName": "key",
"type": "string"
},
{
"name": "name",
"baseName": "name",
"type": "string"
},
{
"name": "optional",
"baseName": "optional",
"type": "boolean"
}
];
//# sourceMappingURL=v1ConfigMapKeySelector.js.map
/***/ }),
/***/ 80512:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1ConfigMapList = void 0;
/**
* ConfigMapList is a resource containing a list of ConfigMap objects.
*/
class V1ConfigMapList {
static getAttributeTypeMap() {
return V1ConfigMapList.attributeTypeMap;
}
}
exports.V1ConfigMapList = V1ConfigMapList;
V1ConfigMapList.discriminator = undefined;
V1ConfigMapList.attributeTypeMap = [
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "items",
"baseName": "items",
"type": "Array"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "metadata",
"baseName": "metadata",
"type": "V1ListMeta"
}
];
//# sourceMappingURL=v1ConfigMapList.js.map
/***/ }),
/***/ 56709:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1ConfigMapNodeConfigSource = void 0;
/**
* ConfigMapNodeConfigSource contains the information to reference a ConfigMap as a config source for the Node. This API is deprecated since 1.22: https://git.k8s.io/enhancements/keps/sig-node/281-dynamic-kubelet-configuration
*/
class V1ConfigMapNodeConfigSource {
static getAttributeTypeMap() {
return V1ConfigMapNodeConfigSource.attributeTypeMap;
}
}
exports.V1ConfigMapNodeConfigSource = V1ConfigMapNodeConfigSource;
V1ConfigMapNodeConfigSource.discriminator = undefined;
V1ConfigMapNodeConfigSource.attributeTypeMap = [
{
"name": "kubeletConfigKey",
"baseName": "kubeletConfigKey",
"type": "string"
},
{
"name": "name",
"baseName": "name",
"type": "string"
},
{
"name": "namespace",
"baseName": "namespace",
"type": "string"
},
{
"name": "resourceVersion",
"baseName": "resourceVersion",
"type": "string"
},
{
"name": "uid",
"baseName": "uid",
"type": "string"
}
];
//# sourceMappingURL=v1ConfigMapNodeConfigSource.js.map
/***/ }),
/***/ 61682:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1ConfigMapProjection = void 0;
/**
* Adapts a ConfigMap into a projected volume. The contents of the target ConfigMap\'s Data field will be presented in a projected volume as files using the keys in the Data field as the file names, unless the items element is populated with specific mappings of keys to paths. Note that this is identical to a configmap volume source without the default mode.
*/
class V1ConfigMapProjection {
static getAttributeTypeMap() {
return V1ConfigMapProjection.attributeTypeMap;
}
}
exports.V1ConfigMapProjection = V1ConfigMapProjection;
V1ConfigMapProjection.discriminator = undefined;
V1ConfigMapProjection.attributeTypeMap = [
{
"name": "items",
"baseName": "items",
"type": "Array"
},
{
"name": "name",
"baseName": "name",
"type": "string"
},
{
"name": "optional",
"baseName": "optional",
"type": "boolean"
}
];
//# sourceMappingURL=v1ConfigMapProjection.js.map
/***/ }),
/***/ 59708:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1ConfigMapVolumeSource = void 0;
/**
* Adapts a ConfigMap into a volume. The contents of the target ConfigMap\'s Data field will be presented in a volume as files using the keys in the Data field as the file names, unless the items element is populated with specific mappings of keys to paths. ConfigMap volumes support ownership management and SELinux relabeling.
*/
class V1ConfigMapVolumeSource {
static getAttributeTypeMap() {
return V1ConfigMapVolumeSource.attributeTypeMap;
}
}
exports.V1ConfigMapVolumeSource = V1ConfigMapVolumeSource;
V1ConfigMapVolumeSource.discriminator = undefined;
V1ConfigMapVolumeSource.attributeTypeMap = [
{
"name": "defaultMode",
"baseName": "defaultMode",
"type": "number"
},
{
"name": "items",
"baseName": "items",
"type": "Array"
},
{
"name": "name",
"baseName": "name",
"type": "string"
},
{
"name": "optional",
"baseName": "optional",
"type": "boolean"
}
];
//# sourceMappingURL=v1ConfigMapVolumeSource.js.map
/***/ }),
/***/ 52865:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1Container = void 0;
/**
* A single application container that you want to run within a pod.
*/
class V1Container {
static getAttributeTypeMap() {
return V1Container.attributeTypeMap;
}
}
exports.V1Container = V1Container;
V1Container.discriminator = undefined;
V1Container.attributeTypeMap = [
{
"name": "args",
"baseName": "args",
"type": "Array"
},
{
"name": "command",
"baseName": "command",
"type": "Array"
},
{
"name": "env",
"baseName": "env",
"type": "Array"
},
{
"name": "envFrom",
"baseName": "envFrom",
"type": "Array"
},
{
"name": "image",
"baseName": "image",
"type": "string"
},
{
"name": "imagePullPolicy",
"baseName": "imagePullPolicy",
"type": "string"
},
{
"name": "lifecycle",
"baseName": "lifecycle",
"type": "V1Lifecycle"
},
{
"name": "livenessProbe",
"baseName": "livenessProbe",
"type": "V1Probe"
},
{
"name": "name",
"baseName": "name",
"type": "string"
},
{
"name": "ports",
"baseName": "ports",
"type": "Array"
},
{
"name": "readinessProbe",
"baseName": "readinessProbe",
"type": "V1Probe"
},
{
"name": "resources",
"baseName": "resources",
"type": "V1ResourceRequirements"
},
{
"name": "securityContext",
"baseName": "securityContext",
"type": "V1SecurityContext"
},
{
"name": "startupProbe",
"baseName": "startupProbe",
"type": "V1Probe"
},
{
"name": "stdin",
"baseName": "stdin",
"type": "boolean"
},
{
"name": "stdinOnce",
"baseName": "stdinOnce",
"type": "boolean"
},
{
"name": "terminationMessagePath",
"baseName": "terminationMessagePath",
"type": "string"
},
{
"name": "terminationMessagePolicy",
"baseName": "terminationMessagePolicy",
"type": "string"
},
{
"name": "tty",
"baseName": "tty",
"type": "boolean"
},
{
"name": "volumeDevices",
"baseName": "volumeDevices",
"type": "Array"
},
{
"name": "volumeMounts",
"baseName": "volumeMounts",
"type": "Array"
},
{
"name": "workingDir",
"baseName": "workingDir",
"type": "string"
}
];
//# sourceMappingURL=v1Container.js.map
/***/ }),
/***/ 13501:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1ContainerImage = void 0;
/**
* Describe a container image
*/
class V1ContainerImage {
static getAttributeTypeMap() {
return V1ContainerImage.attributeTypeMap;
}
}
exports.V1ContainerImage = V1ContainerImage;
V1ContainerImage.discriminator = undefined;
V1ContainerImage.attributeTypeMap = [
{
"name": "names",
"baseName": "names",
"type": "Array"
},
{
"name": "sizeBytes",
"baseName": "sizeBytes",
"type": "number"
}
];
//# sourceMappingURL=v1ContainerImage.js.map
/***/ }),
/***/ 50217:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1ContainerPort = void 0;
/**
* ContainerPort represents a network port in a single container.
*/
class V1ContainerPort {
static getAttributeTypeMap() {
return V1ContainerPort.attributeTypeMap;
}
}
exports.V1ContainerPort = V1ContainerPort;
V1ContainerPort.discriminator = undefined;
V1ContainerPort.attributeTypeMap = [
{
"name": "containerPort",
"baseName": "containerPort",
"type": "number"
},
{
"name": "hostIP",
"baseName": "hostIP",
"type": "string"
},
{
"name": "hostPort",
"baseName": "hostPort",
"type": "number"
},
{
"name": "name",
"baseName": "name",
"type": "string"
},
{
"name": "protocol",
"baseName": "protocol",
"type": "string"
}
];
//# sourceMappingURL=v1ContainerPort.js.map
/***/ }),
/***/ 83765:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1ContainerState = void 0;
/**
* ContainerState holds a possible state of container. Only one of its members may be specified. If none of them is specified, the default one is ContainerStateWaiting.
*/
class V1ContainerState {
static getAttributeTypeMap() {
return V1ContainerState.attributeTypeMap;
}
}
exports.V1ContainerState = V1ContainerState;
V1ContainerState.discriminator = undefined;
V1ContainerState.attributeTypeMap = [
{
"name": "running",
"baseName": "running",
"type": "V1ContainerStateRunning"
},
{
"name": "terminated",
"baseName": "terminated",
"type": "V1ContainerStateTerminated"
},
{
"name": "waiting",
"baseName": "waiting",
"type": "V1ContainerStateWaiting"
}
];
//# sourceMappingURL=v1ContainerState.js.map
/***/ }),
/***/ 89767:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1ContainerStateRunning = void 0;
/**
* ContainerStateRunning is a running state of a container.
*/
class V1ContainerStateRunning {
static getAttributeTypeMap() {
return V1ContainerStateRunning.attributeTypeMap;
}
}
exports.V1ContainerStateRunning = V1ContainerStateRunning;
V1ContainerStateRunning.discriminator = undefined;
V1ContainerStateRunning.attributeTypeMap = [
{
"name": "startedAt",
"baseName": "startedAt",
"type": "Date"
}
];
//# sourceMappingURL=v1ContainerStateRunning.js.map
/***/ }),
/***/ 27892:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1ContainerStateTerminated = void 0;
/**
* ContainerStateTerminated is a terminated state of a container.
*/
class V1ContainerStateTerminated {
static getAttributeTypeMap() {
return V1ContainerStateTerminated.attributeTypeMap;
}
}
exports.V1ContainerStateTerminated = V1ContainerStateTerminated;
V1ContainerStateTerminated.discriminator = undefined;
V1ContainerStateTerminated.attributeTypeMap = [
{
"name": "containerID",
"baseName": "containerID",
"type": "string"
},
{
"name": "exitCode",
"baseName": "exitCode",
"type": "number"
},
{
"name": "finishedAt",
"baseName": "finishedAt",
"type": "Date"
},
{
"name": "message",
"baseName": "message",
"type": "string"
},
{
"name": "reason",
"baseName": "reason",
"type": "string"
},
{
"name": "signal",
"baseName": "signal",
"type": "number"
},
{
"name": "startedAt",
"baseName": "startedAt",
"type": "Date"
}
];
//# sourceMappingURL=v1ContainerStateTerminated.js.map
/***/ }),
/***/ 19716:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1ContainerStateWaiting = void 0;
/**
* ContainerStateWaiting is a waiting state of a container.
*/
class V1ContainerStateWaiting {
static getAttributeTypeMap() {
return V1ContainerStateWaiting.attributeTypeMap;
}
}
exports.V1ContainerStateWaiting = V1ContainerStateWaiting;
V1ContainerStateWaiting.discriminator = undefined;
V1ContainerStateWaiting.attributeTypeMap = [
{
"name": "message",
"baseName": "message",
"type": "string"
},
{
"name": "reason",
"baseName": "reason",
"type": "string"
}
];
//# sourceMappingURL=v1ContainerStateWaiting.js.map
/***/ }),
/***/ 35980:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1ContainerStatus = void 0;
/**
* ContainerStatus contains details for the current status of this container.
*/
class V1ContainerStatus {
static getAttributeTypeMap() {
return V1ContainerStatus.attributeTypeMap;
}
}
exports.V1ContainerStatus = V1ContainerStatus;
V1ContainerStatus.discriminator = undefined;
V1ContainerStatus.attributeTypeMap = [
{
"name": "containerID",
"baseName": "containerID",
"type": "string"
},
{
"name": "image",
"baseName": "image",
"type": "string"
},
{
"name": "imageID",
"baseName": "imageID",
"type": "string"
},
{
"name": "lastState",
"baseName": "lastState",
"type": "V1ContainerState"
},
{
"name": "name",
"baseName": "name",
"type": "string"
},
{
"name": "ready",
"baseName": "ready",
"type": "boolean"
},
{
"name": "restartCount",
"baseName": "restartCount",
"type": "number"
},
{
"name": "started",
"baseName": "started",
"type": "boolean"
},
{
"name": "state",
"baseName": "state",
"type": "V1ContainerState"
}
];
//# sourceMappingURL=v1ContainerStatus.js.map
/***/ }),
/***/ 78405:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1ControllerRevision = void 0;
/**
* ControllerRevision implements an immutable snapshot of state data. Clients are responsible for serializing and deserializing the objects that contain their internal state. Once a ControllerRevision has been successfully created, it can not be updated. The API Server will fail validation of all requests that attempt to mutate the Data field. ControllerRevisions may, however, be deleted. Note that, due to its use by both the DaemonSet and StatefulSet controllers for update and rollback, this object is beta. However, it may be subject to name and representation changes in future releases, and clients should not depend on its stability. It is primarily for internal use by controllers.
*/
class V1ControllerRevision {
static getAttributeTypeMap() {
return V1ControllerRevision.attributeTypeMap;
}
}
exports.V1ControllerRevision = V1ControllerRevision;
V1ControllerRevision.discriminator = undefined;
V1ControllerRevision.attributeTypeMap = [
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "data",
"baseName": "data",
"type": "object"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "metadata",
"baseName": "metadata",
"type": "V1ObjectMeta"
},
{
"name": "revision",
"baseName": "revision",
"type": "number"
}
];
//# sourceMappingURL=v1ControllerRevision.js.map
/***/ }),
/***/ 66304:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1ControllerRevisionList = void 0;
/**
* ControllerRevisionList is a resource containing a list of ControllerRevision objects.
*/
class V1ControllerRevisionList {
static getAttributeTypeMap() {
return V1ControllerRevisionList.attributeTypeMap;
}
}
exports.V1ControllerRevisionList = V1ControllerRevisionList;
V1ControllerRevisionList.discriminator = undefined;
V1ControllerRevisionList.attributeTypeMap = [
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "items",
"baseName": "items",
"type": "Array"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "metadata",
"baseName": "metadata",
"type": "V1ListMeta"
}
];
//# sourceMappingURL=v1ControllerRevisionList.js.map
/***/ }),
/***/ 54382:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1CronJob = void 0;
/**
* CronJob represents the configuration of a single cron job.
*/
class V1CronJob {
static getAttributeTypeMap() {
return V1CronJob.attributeTypeMap;
}
}
exports.V1CronJob = V1CronJob;
V1CronJob.discriminator = undefined;
V1CronJob.attributeTypeMap = [
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "metadata",
"baseName": "metadata",
"type": "V1ObjectMeta"
},
{
"name": "spec",
"baseName": "spec",
"type": "V1CronJobSpec"
},
{
"name": "status",
"baseName": "status",
"type": "V1CronJobStatus"
}
];
//# sourceMappingURL=v1CronJob.js.map
/***/ }),
/***/ 72565:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1CronJobList = void 0;
/**
* CronJobList is a collection of cron jobs.
*/
class V1CronJobList {
static getAttributeTypeMap() {
return V1CronJobList.attributeTypeMap;
}
}
exports.V1CronJobList = V1CronJobList;
V1CronJobList.discriminator = undefined;
V1CronJobList.attributeTypeMap = [
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "items",
"baseName": "items",
"type": "Array"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "metadata",
"baseName": "metadata",
"type": "V1ListMeta"
}
];
//# sourceMappingURL=v1CronJobList.js.map
/***/ }),
/***/ 7011:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1CronJobSpec = void 0;
/**
* CronJobSpec describes how the job execution will look like and when it will actually run.
*/
class V1CronJobSpec {
static getAttributeTypeMap() {
return V1CronJobSpec.attributeTypeMap;
}
}
exports.V1CronJobSpec = V1CronJobSpec;
V1CronJobSpec.discriminator = undefined;
V1CronJobSpec.attributeTypeMap = [
{
"name": "concurrencyPolicy",
"baseName": "concurrencyPolicy",
"type": "string"
},
{
"name": "failedJobsHistoryLimit",
"baseName": "failedJobsHistoryLimit",
"type": "number"
},
{
"name": "jobTemplate",
"baseName": "jobTemplate",
"type": "V1JobTemplateSpec"
},
{
"name": "schedule",
"baseName": "schedule",
"type": "string"
},
{
"name": "startingDeadlineSeconds",
"baseName": "startingDeadlineSeconds",
"type": "number"
},
{
"name": "successfulJobsHistoryLimit",
"baseName": "successfulJobsHistoryLimit",
"type": "number"
},
{
"name": "suspend",
"baseName": "suspend",
"type": "boolean"
}
];
//# sourceMappingURL=v1CronJobSpec.js.map
/***/ }),
/***/ 24600:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1CronJobStatus = void 0;
/**
* CronJobStatus represents the current state of a cron job.
*/
class V1CronJobStatus {
static getAttributeTypeMap() {
return V1CronJobStatus.attributeTypeMap;
}
}
exports.V1CronJobStatus = V1CronJobStatus;
V1CronJobStatus.discriminator = undefined;
V1CronJobStatus.attributeTypeMap = [
{
"name": "active",
"baseName": "active",
"type": "Array"
},
{
"name": "lastScheduleTime",
"baseName": "lastScheduleTime",
"type": "Date"
},
{
"name": "lastSuccessfulTime",
"baseName": "lastSuccessfulTime",
"type": "Date"
}
];
//# sourceMappingURL=v1CronJobStatus.js.map
/***/ }),
/***/ 34233:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1CrossVersionObjectReference = void 0;
/**
* CrossVersionObjectReference contains enough information to let you identify the referred resource.
*/
class V1CrossVersionObjectReference {
static getAttributeTypeMap() {
return V1CrossVersionObjectReference.attributeTypeMap;
}
}
exports.V1CrossVersionObjectReference = V1CrossVersionObjectReference;
V1CrossVersionObjectReference.discriminator = undefined;
V1CrossVersionObjectReference.attributeTypeMap = [
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "name",
"baseName": "name",
"type": "string"
}
];
//# sourceMappingURL=v1CrossVersionObjectReference.js.map
/***/ }),
/***/ 94346:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1CustomResourceColumnDefinition = void 0;
/**
* CustomResourceColumnDefinition specifies a column for server side printing.
*/
class V1CustomResourceColumnDefinition {
static getAttributeTypeMap() {
return V1CustomResourceColumnDefinition.attributeTypeMap;
}
}
exports.V1CustomResourceColumnDefinition = V1CustomResourceColumnDefinition;
V1CustomResourceColumnDefinition.discriminator = undefined;
V1CustomResourceColumnDefinition.attributeTypeMap = [
{
"name": "description",
"baseName": "description",
"type": "string"
},
{
"name": "format",
"baseName": "format",
"type": "string"
},
{
"name": "jsonPath",
"baseName": "jsonPath",
"type": "string"
},
{
"name": "name",
"baseName": "name",
"type": "string"
},
{
"name": "priority",
"baseName": "priority",
"type": "number"
},
{
"name": "type",
"baseName": "type",
"type": "string"
}
];
//# sourceMappingURL=v1CustomResourceColumnDefinition.js.map
/***/ }),
/***/ 9731:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1CustomResourceConversion = void 0;
/**
* CustomResourceConversion describes how to convert different versions of a CR.
*/
class V1CustomResourceConversion {
static getAttributeTypeMap() {
return V1CustomResourceConversion.attributeTypeMap;
}
}
exports.V1CustomResourceConversion = V1CustomResourceConversion;
V1CustomResourceConversion.discriminator = undefined;
V1CustomResourceConversion.attributeTypeMap = [
{
"name": "strategy",
"baseName": "strategy",
"type": "string"
},
{
"name": "webhook",
"baseName": "webhook",
"type": "V1WebhookConversion"
}
];
//# sourceMappingURL=v1CustomResourceConversion.js.map
/***/ }),
/***/ 40325:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1CustomResourceDefinition = void 0;
/**
* CustomResourceDefinition represents a resource that should be exposed on the API server. Its name MUST be in the format <.spec.name>.<.spec.group>.
*/
class V1CustomResourceDefinition {
static getAttributeTypeMap() {
return V1CustomResourceDefinition.attributeTypeMap;
}
}
exports.V1CustomResourceDefinition = V1CustomResourceDefinition;
V1CustomResourceDefinition.discriminator = undefined;
V1CustomResourceDefinition.attributeTypeMap = [
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "metadata",
"baseName": "metadata",
"type": "V1ObjectMeta"
},
{
"name": "spec",
"baseName": "spec",
"type": "V1CustomResourceDefinitionSpec"
},
{
"name": "status",
"baseName": "status",
"type": "V1CustomResourceDefinitionStatus"
}
];
//# sourceMappingURL=v1CustomResourceDefinition.js.map
/***/ }),
/***/ 32791:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1CustomResourceDefinitionCondition = void 0;
/**
* CustomResourceDefinitionCondition contains details for the current condition of this pod.
*/
class V1CustomResourceDefinitionCondition {
static getAttributeTypeMap() {
return V1CustomResourceDefinitionCondition.attributeTypeMap;
}
}
exports.V1CustomResourceDefinitionCondition = V1CustomResourceDefinitionCondition;
V1CustomResourceDefinitionCondition.discriminator = undefined;
V1CustomResourceDefinitionCondition.attributeTypeMap = [
{
"name": "lastTransitionTime",
"baseName": "lastTransitionTime",
"type": "Date"
},
{
"name": "message",
"baseName": "message",
"type": "string"
},
{
"name": "reason",
"baseName": "reason",
"type": "string"
},
{
"name": "status",
"baseName": "status",
"type": "string"
},
{
"name": "type",
"baseName": "type",
"type": "string"
}
];
//# sourceMappingURL=v1CustomResourceDefinitionCondition.js.map
/***/ }),
/***/ 10486:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1CustomResourceDefinitionList = void 0;
/**
* CustomResourceDefinitionList is a list of CustomResourceDefinition objects.
*/
class V1CustomResourceDefinitionList {
static getAttributeTypeMap() {
return V1CustomResourceDefinitionList.attributeTypeMap;
}
}
exports.V1CustomResourceDefinitionList = V1CustomResourceDefinitionList;
V1CustomResourceDefinitionList.discriminator = undefined;
V1CustomResourceDefinitionList.attributeTypeMap = [
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "items",
"baseName": "items",
"type": "Array"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "metadata",
"baseName": "metadata",
"type": "V1ListMeta"
}
];
//# sourceMappingURL=v1CustomResourceDefinitionList.js.map
/***/ }),
/***/ 69798:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1CustomResourceDefinitionNames = void 0;
/**
* CustomResourceDefinitionNames indicates the names to serve this CustomResourceDefinition
*/
class V1CustomResourceDefinitionNames {
static getAttributeTypeMap() {
return V1CustomResourceDefinitionNames.attributeTypeMap;
}
}
exports.V1CustomResourceDefinitionNames = V1CustomResourceDefinitionNames;
V1CustomResourceDefinitionNames.discriminator = undefined;
V1CustomResourceDefinitionNames.attributeTypeMap = [
{
"name": "categories",
"baseName": "categories",
"type": "Array"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "listKind",
"baseName": "listKind",
"type": "string"
},
{
"name": "plural",
"baseName": "plural",
"type": "string"
},
{
"name": "shortNames",
"baseName": "shortNames",
"type": "Array"
},
{
"name": "singular",
"baseName": "singular",
"type": "string"
}
];
//# sourceMappingURL=v1CustomResourceDefinitionNames.js.map
/***/ }),
/***/ 20486:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1CustomResourceDefinitionSpec = void 0;
/**
* CustomResourceDefinitionSpec describes how a user wants their resource to appear
*/
class V1CustomResourceDefinitionSpec {
static getAttributeTypeMap() {
return V1CustomResourceDefinitionSpec.attributeTypeMap;
}
}
exports.V1CustomResourceDefinitionSpec = V1CustomResourceDefinitionSpec;
V1CustomResourceDefinitionSpec.discriminator = undefined;
V1CustomResourceDefinitionSpec.attributeTypeMap = [
{
"name": "conversion",
"baseName": "conversion",
"type": "V1CustomResourceConversion"
},
{
"name": "group",
"baseName": "group",
"type": "string"
},
{
"name": "names",
"baseName": "names",
"type": "V1CustomResourceDefinitionNames"
},
{
"name": "preserveUnknownFields",
"baseName": "preserveUnknownFields",
"type": "boolean"
},
{
"name": "scope",
"baseName": "scope",
"type": "string"
},
{
"name": "versions",
"baseName": "versions",
"type": "Array"
}
];
//# sourceMappingURL=v1CustomResourceDefinitionSpec.js.map
/***/ }),
/***/ 25713:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1CustomResourceDefinitionStatus = void 0;
/**
* CustomResourceDefinitionStatus indicates the state of the CustomResourceDefinition
*/
class V1CustomResourceDefinitionStatus {
static getAttributeTypeMap() {
return V1CustomResourceDefinitionStatus.attributeTypeMap;
}
}
exports.V1CustomResourceDefinitionStatus = V1CustomResourceDefinitionStatus;
V1CustomResourceDefinitionStatus.discriminator = undefined;
V1CustomResourceDefinitionStatus.attributeTypeMap = [
{
"name": "acceptedNames",
"baseName": "acceptedNames",
"type": "V1CustomResourceDefinitionNames"
},
{
"name": "conditions",
"baseName": "conditions",
"type": "Array"
},
{
"name": "storedVersions",
"baseName": "storedVersions",
"type": "Array"
}
];
//# sourceMappingURL=v1CustomResourceDefinitionStatus.js.map
/***/ }),
/***/ 82283:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1CustomResourceDefinitionVersion = void 0;
/**
* CustomResourceDefinitionVersion describes a version for CRD.
*/
class V1CustomResourceDefinitionVersion {
static getAttributeTypeMap() {
return V1CustomResourceDefinitionVersion.attributeTypeMap;
}
}
exports.V1CustomResourceDefinitionVersion = V1CustomResourceDefinitionVersion;
V1CustomResourceDefinitionVersion.discriminator = undefined;
V1CustomResourceDefinitionVersion.attributeTypeMap = [
{
"name": "additionalPrinterColumns",
"baseName": "additionalPrinterColumns",
"type": "Array"
},
{
"name": "deprecated",
"baseName": "deprecated",
"type": "boolean"
},
{
"name": "deprecationWarning",
"baseName": "deprecationWarning",
"type": "string"
},
{
"name": "name",
"baseName": "name",
"type": "string"
},
{
"name": "schema",
"baseName": "schema",
"type": "V1CustomResourceValidation"
},
{
"name": "served",
"baseName": "served",
"type": "boolean"
},
{
"name": "storage",
"baseName": "storage",
"type": "boolean"
},
{
"name": "subresources",
"baseName": "subresources",
"type": "V1CustomResourceSubresources"
}
];
//# sourceMappingURL=v1CustomResourceDefinitionVersion.js.map
/***/ }),
/***/ 98087:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1CustomResourceSubresourceScale = void 0;
/**
* CustomResourceSubresourceScale defines how to serve the scale subresource for CustomResources.
*/
class V1CustomResourceSubresourceScale {
static getAttributeTypeMap() {
return V1CustomResourceSubresourceScale.attributeTypeMap;
}
}
exports.V1CustomResourceSubresourceScale = V1CustomResourceSubresourceScale;
V1CustomResourceSubresourceScale.discriminator = undefined;
V1CustomResourceSubresourceScale.attributeTypeMap = [
{
"name": "labelSelectorPath",
"baseName": "labelSelectorPath",
"type": "string"
},
{
"name": "specReplicasPath",
"baseName": "specReplicasPath",
"type": "string"
},
{
"name": "statusReplicasPath",
"baseName": "statusReplicasPath",
"type": "string"
}
];
//# sourceMappingURL=v1CustomResourceSubresourceScale.js.map
/***/ }),
/***/ 94579:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1CustomResourceSubresources = void 0;
/**
* CustomResourceSubresources defines the status and scale subresources for CustomResources.
*/
class V1CustomResourceSubresources {
static getAttributeTypeMap() {
return V1CustomResourceSubresources.attributeTypeMap;
}
}
exports.V1CustomResourceSubresources = V1CustomResourceSubresources;
V1CustomResourceSubresources.discriminator = undefined;
V1CustomResourceSubresources.attributeTypeMap = [
{
"name": "scale",
"baseName": "scale",
"type": "V1CustomResourceSubresourceScale"
},
{
"name": "status",
"baseName": "status",
"type": "object"
}
];
//# sourceMappingURL=v1CustomResourceSubresources.js.map
/***/ }),
/***/ 25408:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1CustomResourceValidation = void 0;
/**
* CustomResourceValidation is a list of validation methods for CustomResources.
*/
class V1CustomResourceValidation {
static getAttributeTypeMap() {
return V1CustomResourceValidation.attributeTypeMap;
}
}
exports.V1CustomResourceValidation = V1CustomResourceValidation;
V1CustomResourceValidation.discriminator = undefined;
V1CustomResourceValidation.attributeTypeMap = [
{
"name": "openAPIV3Schema",
"baseName": "openAPIV3Schema",
"type": "V1JSONSchemaProps"
}
];
//# sourceMappingURL=v1CustomResourceValidation.js.map
/***/ }),
/***/ 37060:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1DaemonEndpoint = void 0;
/**
* DaemonEndpoint contains information about a single Daemon endpoint.
*/
class V1DaemonEndpoint {
static getAttributeTypeMap() {
return V1DaemonEndpoint.attributeTypeMap;
}
}
exports.V1DaemonEndpoint = V1DaemonEndpoint;
V1DaemonEndpoint.discriminator = undefined;
V1DaemonEndpoint.attributeTypeMap = [
{
"name": "Port",
"baseName": "Port",
"type": "number"
}
];
//# sourceMappingURL=v1DaemonEndpoint.js.map
/***/ }),
/***/ 32699:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1DaemonSet = void 0;
/**
* DaemonSet represents the configuration of a daemon set.
*/
class V1DaemonSet {
static getAttributeTypeMap() {
return V1DaemonSet.attributeTypeMap;
}
}
exports.V1DaemonSet = V1DaemonSet;
V1DaemonSet.discriminator = undefined;
V1DaemonSet.attributeTypeMap = [
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "metadata",
"baseName": "metadata",
"type": "V1ObjectMeta"
},
{
"name": "spec",
"baseName": "spec",
"type": "V1DaemonSetSpec"
},
{
"name": "status",
"baseName": "status",
"type": "V1DaemonSetStatus"
}
];
//# sourceMappingURL=v1DaemonSet.js.map
/***/ }),
/***/ 77063:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1DaemonSetCondition = void 0;
/**
* DaemonSetCondition describes the state of a DaemonSet at a certain point.
*/
class V1DaemonSetCondition {
static getAttributeTypeMap() {
return V1DaemonSetCondition.attributeTypeMap;
}
}
exports.V1DaemonSetCondition = V1DaemonSetCondition;
V1DaemonSetCondition.discriminator = undefined;
V1DaemonSetCondition.attributeTypeMap = [
{
"name": "lastTransitionTime",
"baseName": "lastTransitionTime",
"type": "Date"
},
{
"name": "message",
"baseName": "message",
"type": "string"
},
{
"name": "reason",
"baseName": "reason",
"type": "string"
},
{
"name": "status",
"baseName": "status",
"type": "string"
},
{
"name": "type",
"baseName": "type",
"type": "string"
}
];
//# sourceMappingURL=v1DaemonSetCondition.js.map
/***/ }),
/***/ 173:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1DaemonSetList = void 0;
/**
* DaemonSetList is a collection of daemon sets.
*/
class V1DaemonSetList {
static getAttributeTypeMap() {
return V1DaemonSetList.attributeTypeMap;
}
}
exports.V1DaemonSetList = V1DaemonSetList;
V1DaemonSetList.discriminator = undefined;
V1DaemonSetList.attributeTypeMap = [
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "items",
"baseName": "items",
"type": "Array"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "metadata",
"baseName": "metadata",
"type": "V1ListMeta"
}
];
//# sourceMappingURL=v1DaemonSetList.js.map
/***/ }),
/***/ 44560:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1DaemonSetSpec = void 0;
/**
* DaemonSetSpec is the specification of a daemon set.
*/
class V1DaemonSetSpec {
static getAttributeTypeMap() {
return V1DaemonSetSpec.attributeTypeMap;
}
}
exports.V1DaemonSetSpec = V1DaemonSetSpec;
V1DaemonSetSpec.discriminator = undefined;
V1DaemonSetSpec.attributeTypeMap = [
{
"name": "minReadySeconds",
"baseName": "minReadySeconds",
"type": "number"
},
{
"name": "revisionHistoryLimit",
"baseName": "revisionHistoryLimit",
"type": "number"
},
{
"name": "selector",
"baseName": "selector",
"type": "V1LabelSelector"
},
{
"name": "template",
"baseName": "template",
"type": "V1PodTemplateSpec"
},
{
"name": "updateStrategy",
"baseName": "updateStrategy",
"type": "V1DaemonSetUpdateStrategy"
}
];
//# sourceMappingURL=v1DaemonSetSpec.js.map
/***/ }),
/***/ 80195:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1DaemonSetStatus = void 0;
/**
* DaemonSetStatus represents the current status of a daemon set.
*/
class V1DaemonSetStatus {
static getAttributeTypeMap() {
return V1DaemonSetStatus.attributeTypeMap;
}
}
exports.V1DaemonSetStatus = V1DaemonSetStatus;
V1DaemonSetStatus.discriminator = undefined;
V1DaemonSetStatus.attributeTypeMap = [
{
"name": "collisionCount",
"baseName": "collisionCount",
"type": "number"
},
{
"name": "conditions",
"baseName": "conditions",
"type": "Array"
},
{
"name": "currentNumberScheduled",
"baseName": "currentNumberScheduled",
"type": "number"
},
{
"name": "desiredNumberScheduled",
"baseName": "desiredNumberScheduled",
"type": "number"
},
{
"name": "numberAvailable",
"baseName": "numberAvailable",
"type": "number"
},
{
"name": "numberMisscheduled",
"baseName": "numberMisscheduled",
"type": "number"
},
{
"name": "numberReady",
"baseName": "numberReady",
"type": "number"
},
{
"name": "numberUnavailable",
"baseName": "numberUnavailable",
"type": "number"
},
{
"name": "observedGeneration",
"baseName": "observedGeneration",
"type": "number"
},
{
"name": "updatedNumberScheduled",
"baseName": "updatedNumberScheduled",
"type": "number"
}
];
//# sourceMappingURL=v1DaemonSetStatus.js.map
/***/ }),
/***/ 48451:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1DaemonSetUpdateStrategy = void 0;
/**
* DaemonSetUpdateStrategy is a struct used to control the update strategy for a DaemonSet.
*/
class V1DaemonSetUpdateStrategy {
static getAttributeTypeMap() {
return V1DaemonSetUpdateStrategy.attributeTypeMap;
}
}
exports.V1DaemonSetUpdateStrategy = V1DaemonSetUpdateStrategy;
V1DaemonSetUpdateStrategy.discriminator = undefined;
V1DaemonSetUpdateStrategy.attributeTypeMap = [
{
"name": "rollingUpdate",
"baseName": "rollingUpdate",
"type": "V1RollingUpdateDaemonSet"
},
{
"name": "type",
"baseName": "type",
"type": "string"
}
];
//# sourceMappingURL=v1DaemonSetUpdateStrategy.js.map
/***/ }),
/***/ 18029:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1DeleteOptions = void 0;
/**
* DeleteOptions may be provided when deleting an API object.
*/
class V1DeleteOptions {
static getAttributeTypeMap() {
return V1DeleteOptions.attributeTypeMap;
}
}
exports.V1DeleteOptions = V1DeleteOptions;
V1DeleteOptions.discriminator = undefined;
V1DeleteOptions.attributeTypeMap = [
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "dryRun",
"baseName": "dryRun",
"type": "Array"
},
{
"name": "gracePeriodSeconds",
"baseName": "gracePeriodSeconds",
"type": "number"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "orphanDependents",
"baseName": "orphanDependents",
"type": "boolean"
},
{
"name": "preconditions",
"baseName": "preconditions",
"type": "V1Preconditions"
},
{
"name": "propagationPolicy",
"baseName": "propagationPolicy",
"type": "string"
}
];
//# sourceMappingURL=v1DeleteOptions.js.map
/***/ }),
/***/ 65310:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1Deployment = void 0;
/**
* Deployment enables declarative updates for Pods and ReplicaSets.
*/
class V1Deployment {
static getAttributeTypeMap() {
return V1Deployment.attributeTypeMap;
}
}
exports.V1Deployment = V1Deployment;
V1Deployment.discriminator = undefined;
V1Deployment.attributeTypeMap = [
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "metadata",
"baseName": "metadata",
"type": "V1ObjectMeta"
},
{
"name": "spec",
"baseName": "spec",
"type": "V1DeploymentSpec"
},
{
"name": "status",
"baseName": "status",
"type": "V1DeploymentStatus"
}
];
//# sourceMappingURL=v1Deployment.js.map
/***/ }),
/***/ 95602:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1DeploymentCondition = void 0;
/**
* DeploymentCondition describes the state of a deployment at a certain point.
*/
class V1DeploymentCondition {
static getAttributeTypeMap() {
return V1DeploymentCondition.attributeTypeMap;
}
}
exports.V1DeploymentCondition = V1DeploymentCondition;
V1DeploymentCondition.discriminator = undefined;
V1DeploymentCondition.attributeTypeMap = [
{
"name": "lastTransitionTime",
"baseName": "lastTransitionTime",
"type": "Date"
},
{
"name": "lastUpdateTime",
"baseName": "lastUpdateTime",
"type": "Date"
},
{
"name": "message",
"baseName": "message",
"type": "string"
},
{
"name": "reason",
"baseName": "reason",
"type": "string"
},
{
"name": "status",
"baseName": "status",
"type": "string"
},
{
"name": "type",
"baseName": "type",
"type": "string"
}
];
//# sourceMappingURL=v1DeploymentCondition.js.map
/***/ }),
/***/ 81364:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1DeploymentList = void 0;
/**
* DeploymentList is a list of Deployments.
*/
class V1DeploymentList {
static getAttributeTypeMap() {
return V1DeploymentList.attributeTypeMap;
}
}
exports.V1DeploymentList = V1DeploymentList;
V1DeploymentList.discriminator = undefined;
V1DeploymentList.attributeTypeMap = [
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "items",
"baseName": "items",
"type": "Array"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "metadata",
"baseName": "metadata",
"type": "V1ListMeta"
}
];
//# sourceMappingURL=v1DeploymentList.js.map
/***/ }),
/***/ 41298:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1DeploymentSpec = void 0;
/**
* DeploymentSpec is the specification of the desired behavior of the Deployment.
*/
class V1DeploymentSpec {
static getAttributeTypeMap() {
return V1DeploymentSpec.attributeTypeMap;
}
}
exports.V1DeploymentSpec = V1DeploymentSpec;
V1DeploymentSpec.discriminator = undefined;
V1DeploymentSpec.attributeTypeMap = [
{
"name": "minReadySeconds",
"baseName": "minReadySeconds",
"type": "number"
},
{
"name": "paused",
"baseName": "paused",
"type": "boolean"
},
{
"name": "progressDeadlineSeconds",
"baseName": "progressDeadlineSeconds",
"type": "number"
},
{
"name": "replicas",
"baseName": "replicas",
"type": "number"
},
{
"name": "revisionHistoryLimit",
"baseName": "revisionHistoryLimit",
"type": "number"
},
{
"name": "selector",
"baseName": "selector",
"type": "V1LabelSelector"
},
{
"name": "strategy",
"baseName": "strategy",
"type": "V1DeploymentStrategy"
},
{
"name": "template",
"baseName": "template",
"type": "V1PodTemplateSpec"
}
];
//# sourceMappingURL=v1DeploymentSpec.js.map
/***/ }),
/***/ 55398:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1DeploymentStatus = void 0;
/**
* DeploymentStatus is the most recently observed status of the Deployment.
*/
class V1DeploymentStatus {
static getAttributeTypeMap() {
return V1DeploymentStatus.attributeTypeMap;
}
}
exports.V1DeploymentStatus = V1DeploymentStatus;
V1DeploymentStatus.discriminator = undefined;
V1DeploymentStatus.attributeTypeMap = [
{
"name": "availableReplicas",
"baseName": "availableReplicas",
"type": "number"
},
{
"name": "collisionCount",
"baseName": "collisionCount",
"type": "number"
},
{
"name": "conditions",
"baseName": "conditions",
"type": "Array"
},
{
"name": "observedGeneration",
"baseName": "observedGeneration",
"type": "number"
},
{
"name": "readyReplicas",
"baseName": "readyReplicas",
"type": "number"
},
{
"name": "replicas",
"baseName": "replicas",
"type": "number"
},
{
"name": "unavailableReplicas",
"baseName": "unavailableReplicas",
"type": "number"
},
{
"name": "updatedReplicas",
"baseName": "updatedReplicas",
"type": "number"
}
];
//# sourceMappingURL=v1DeploymentStatus.js.map
/***/ }),
/***/ 34981:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1DeploymentStrategy = void 0;
/**
* DeploymentStrategy describes how to replace existing pods with new ones.
*/
class V1DeploymentStrategy {
static getAttributeTypeMap() {
return V1DeploymentStrategy.attributeTypeMap;
}
}
exports.V1DeploymentStrategy = V1DeploymentStrategy;
V1DeploymentStrategy.discriminator = undefined;
V1DeploymentStrategy.attributeTypeMap = [
{
"name": "rollingUpdate",
"baseName": "rollingUpdate",
"type": "V1RollingUpdateDeployment"
},
{
"name": "type",
"baseName": "type",
"type": "string"
}
];
//# sourceMappingURL=v1DeploymentStrategy.js.map
/***/ }),
/***/ 38099:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1DownwardAPIProjection = void 0;
/**
* Represents downward API info for projecting into a projected volume. Note that this is identical to a downwardAPI volume source without the default mode.
*/
class V1DownwardAPIProjection {
static getAttributeTypeMap() {
return V1DownwardAPIProjection.attributeTypeMap;
}
}
exports.V1DownwardAPIProjection = V1DownwardAPIProjection;
V1DownwardAPIProjection.discriminator = undefined;
V1DownwardAPIProjection.attributeTypeMap = [
{
"name": "items",
"baseName": "items",
"type": "Array"
}
];
//# sourceMappingURL=v1DownwardAPIProjection.js.map
/***/ }),
/***/ 78901:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1DownwardAPIVolumeFile = void 0;
/**
* DownwardAPIVolumeFile represents information to create the file containing the pod field
*/
class V1DownwardAPIVolumeFile {
static getAttributeTypeMap() {
return V1DownwardAPIVolumeFile.attributeTypeMap;
}
}
exports.V1DownwardAPIVolumeFile = V1DownwardAPIVolumeFile;
V1DownwardAPIVolumeFile.discriminator = undefined;
V1DownwardAPIVolumeFile.attributeTypeMap = [
{
"name": "fieldRef",
"baseName": "fieldRef",
"type": "V1ObjectFieldSelector"
},
{
"name": "mode",
"baseName": "mode",
"type": "number"
},
{
"name": "path",
"baseName": "path",
"type": "string"
},
{
"name": "resourceFieldRef",
"baseName": "resourceFieldRef",
"type": "V1ResourceFieldSelector"
}
];
//# sourceMappingURL=v1DownwardAPIVolumeFile.js.map
/***/ }),
/***/ 19493:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1DownwardAPIVolumeSource = void 0;
/**
* DownwardAPIVolumeSource represents a volume containing downward API info. Downward API volumes support ownership management and SELinux relabeling.
*/
class V1DownwardAPIVolumeSource {
static getAttributeTypeMap() {
return V1DownwardAPIVolumeSource.attributeTypeMap;
}
}
exports.V1DownwardAPIVolumeSource = V1DownwardAPIVolumeSource;
V1DownwardAPIVolumeSource.discriminator = undefined;
V1DownwardAPIVolumeSource.attributeTypeMap = [
{
"name": "defaultMode",
"baseName": "defaultMode",
"type": "number"
},
{
"name": "items",
"baseName": "items",
"type": "Array"
}
];
//# sourceMappingURL=v1DownwardAPIVolumeSource.js.map
/***/ }),
/***/ 11672:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1EmptyDirVolumeSource = void 0;
/**
* Represents an empty directory for a pod. Empty directory volumes support ownership management and SELinux relabeling.
*/
class V1EmptyDirVolumeSource {
static getAttributeTypeMap() {
return V1EmptyDirVolumeSource.attributeTypeMap;
}
}
exports.V1EmptyDirVolumeSource = V1EmptyDirVolumeSource;
V1EmptyDirVolumeSource.discriminator = undefined;
V1EmptyDirVolumeSource.attributeTypeMap = [
{
"name": "medium",
"baseName": "medium",
"type": "string"
},
{
"name": "sizeLimit",
"baseName": "sizeLimit",
"type": "string"
}
];
//# sourceMappingURL=v1EmptyDirVolumeSource.js.map
/***/ }),
/***/ 17252:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1Endpoint = void 0;
/**
* Endpoint represents a single logical \"backend\" implementing a service.
*/
class V1Endpoint {
static getAttributeTypeMap() {
return V1Endpoint.attributeTypeMap;
}
}
exports.V1Endpoint = V1Endpoint;
V1Endpoint.discriminator = undefined;
V1Endpoint.attributeTypeMap = [
{
"name": "addresses",
"baseName": "addresses",
"type": "Array"
},
{
"name": "conditions",
"baseName": "conditions",
"type": "V1EndpointConditions"
},
{
"name": "deprecatedTopology",
"baseName": "deprecatedTopology",
"type": "{ [key: string]: string; }"
},
{
"name": "hints",
"baseName": "hints",
"type": "V1EndpointHints"
},
{
"name": "hostname",
"baseName": "hostname",
"type": "string"
},
{
"name": "nodeName",
"baseName": "nodeName",
"type": "string"
},
{
"name": "targetRef",
"baseName": "targetRef",
"type": "V1ObjectReference"
},
{
"name": "zone",
"baseName": "zone",
"type": "string"
}
];
//# sourceMappingURL=v1Endpoint.js.map
/***/ }),
/***/ 57151:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1EndpointAddress = void 0;
/**
* EndpointAddress is a tuple that describes single IP address.
*/
class V1EndpointAddress {
static getAttributeTypeMap() {
return V1EndpointAddress.attributeTypeMap;
}
}
exports.V1EndpointAddress = V1EndpointAddress;
V1EndpointAddress.discriminator = undefined;
V1EndpointAddress.attributeTypeMap = [
{
"name": "hostname",
"baseName": "hostname",
"type": "string"
},
{
"name": "ip",
"baseName": "ip",
"type": "string"
},
{
"name": "nodeName",
"baseName": "nodeName",
"type": "string"
},
{
"name": "targetRef",
"baseName": "targetRef",
"type": "V1ObjectReference"
}
];
//# sourceMappingURL=v1EndpointAddress.js.map
/***/ }),
/***/ 70435:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1EndpointConditions = void 0;
/**
* EndpointConditions represents the current condition of an endpoint.
*/
class V1EndpointConditions {
static getAttributeTypeMap() {
return V1EndpointConditions.attributeTypeMap;
}
}
exports.V1EndpointConditions = V1EndpointConditions;
V1EndpointConditions.discriminator = undefined;
V1EndpointConditions.attributeTypeMap = [
{
"name": "ready",
"baseName": "ready",
"type": "boolean"
},
{
"name": "serving",
"baseName": "serving",
"type": "boolean"
},
{
"name": "terminating",
"baseName": "terminating",
"type": "boolean"
}
];
//# sourceMappingURL=v1EndpointConditions.js.map
/***/ }),
/***/ 97000:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1EndpointHints = void 0;
/**
* EndpointHints provides hints describing how an endpoint should be consumed.
*/
class V1EndpointHints {
static getAttributeTypeMap() {
return V1EndpointHints.attributeTypeMap;
}
}
exports.V1EndpointHints = V1EndpointHints;
V1EndpointHints.discriminator = undefined;
V1EndpointHints.attributeTypeMap = [
{
"name": "forZones",
"baseName": "forZones",
"type": "Array"
}
];
//# sourceMappingURL=v1EndpointHints.js.map
/***/ }),
/***/ 53708:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1EndpointSlice = void 0;
/**
* EndpointSlice represents a subset of the endpoints that implement a service. For a given service there may be multiple EndpointSlice objects, selected by labels, which must be joined to produce the full set of endpoints.
*/
class V1EndpointSlice {
static getAttributeTypeMap() {
return V1EndpointSlice.attributeTypeMap;
}
}
exports.V1EndpointSlice = V1EndpointSlice;
V1EndpointSlice.discriminator = undefined;
V1EndpointSlice.attributeTypeMap = [
{
"name": "addressType",
"baseName": "addressType",
"type": "string"
},
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "endpoints",
"baseName": "endpoints",
"type": "Array"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "metadata",
"baseName": "metadata",
"type": "V1ObjectMeta"
},
{
"name": "ports",
"baseName": "ports",
"type": "Array"
}
];
//# sourceMappingURL=v1EndpointSlice.js.map
/***/ }),
/***/ 6223:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1EndpointSliceList = void 0;
/**
* EndpointSliceList represents a list of endpoint slices
*/
class V1EndpointSliceList {
static getAttributeTypeMap() {
return V1EndpointSliceList.attributeTypeMap;
}
}
exports.V1EndpointSliceList = V1EndpointSliceList;
V1EndpointSliceList.discriminator = undefined;
V1EndpointSliceList.attributeTypeMap = [
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "items",
"baseName": "items",
"type": "Array"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "metadata",
"baseName": "metadata",
"type": "V1ListMeta"
}
];
//# sourceMappingURL=v1EndpointSliceList.js.map
/***/ }),
/***/ 31925:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1EndpointSubset = void 0;
/**
* EndpointSubset is a group of addresses with a common set of ports. The expanded set of endpoints is the Cartesian product of Addresses x Ports. For example, given: { Addresses: [{\"ip\": \"10.10.1.1\"}, {\"ip\": \"10.10.2.2\"}], Ports: [{\"name\": \"a\", \"port\": 8675}, {\"name\": \"b\", \"port\": 309}] } The resulting set of endpoints can be viewed as: a: [ 10.10.1.1:8675, 10.10.2.2:8675 ], b: [ 10.10.1.1:309, 10.10.2.2:309 ]
*/
class V1EndpointSubset {
static getAttributeTypeMap() {
return V1EndpointSubset.attributeTypeMap;
}
}
exports.V1EndpointSubset = V1EndpointSubset;
V1EndpointSubset.discriminator = undefined;
V1EndpointSubset.attributeTypeMap = [
{
"name": "addresses",
"baseName": "addresses",
"type": "Array"
},
{
"name": "notReadyAddresses",
"baseName": "notReadyAddresses",
"type": "Array"
},
{
"name": "ports",
"baseName": "ports",
"type": "Array"
}
];
//# sourceMappingURL=v1EndpointSubset.js.map
/***/ }),
/***/ 13449:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1Endpoints = void 0;
/**
* Endpoints is a collection of endpoints that implement the actual service. Example: Name: \"mysvc\", Subsets: [ { Addresses: [{\"ip\": \"10.10.1.1\"}, {\"ip\": \"10.10.2.2\"}], Ports: [{\"name\": \"a\", \"port\": 8675}, {\"name\": \"b\", \"port\": 309}] }, { Addresses: [{\"ip\": \"10.10.3.3\"}], Ports: [{\"name\": \"a\", \"port\": 93}, {\"name\": \"b\", \"port\": 76}] }, ]
*/
class V1Endpoints {
static getAttributeTypeMap() {
return V1Endpoints.attributeTypeMap;
}
}
exports.V1Endpoints = V1Endpoints;
V1Endpoints.discriminator = undefined;
V1Endpoints.attributeTypeMap = [
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "metadata",
"baseName": "metadata",
"type": "V1ObjectMeta"
},
{
"name": "subsets",
"baseName": "subsets",
"type": "Array"
}
];
//# sourceMappingURL=v1Endpoints.js.map
/***/ }),
/***/ 95223:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1EndpointsList = void 0;
/**
* EndpointsList is a list of endpoints.
*/
class V1EndpointsList {
static getAttributeTypeMap() {
return V1EndpointsList.attributeTypeMap;
}
}
exports.V1EndpointsList = V1EndpointsList;
V1EndpointsList.discriminator = undefined;
V1EndpointsList.attributeTypeMap = [
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "items",
"baseName": "items",
"type": "Array"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "metadata",
"baseName": "metadata",
"type": "V1ListMeta"
}
];
//# sourceMappingURL=v1EndpointsList.js.map
/***/ }),
/***/ 23074:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1EnvFromSource = void 0;
/**
* EnvFromSource represents the source of a set of ConfigMaps
*/
class V1EnvFromSource {
static getAttributeTypeMap() {
return V1EnvFromSource.attributeTypeMap;
}
}
exports.V1EnvFromSource = V1EnvFromSource;
V1EnvFromSource.discriminator = undefined;
V1EnvFromSource.attributeTypeMap = [
{
"name": "configMapRef",
"baseName": "configMapRef",
"type": "V1ConfigMapEnvSource"
},
{
"name": "prefix",
"baseName": "prefix",
"type": "string"
},
{
"name": "secretRef",
"baseName": "secretRef",
"type": "V1SecretEnvSource"
}
];
//# sourceMappingURL=v1EnvFromSource.js.map
/***/ }),
/***/ 36874:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1EnvVar = void 0;
/**
* EnvVar represents an environment variable present in a Container.
*/
class V1EnvVar {
static getAttributeTypeMap() {
return V1EnvVar.attributeTypeMap;
}
}
exports.V1EnvVar = V1EnvVar;
V1EnvVar.discriminator = undefined;
V1EnvVar.attributeTypeMap = [
{
"name": "name",
"baseName": "name",
"type": "string"
},
{
"name": "value",
"baseName": "value",
"type": "string"
},
{
"name": "valueFrom",
"baseName": "valueFrom",
"type": "V1EnvVarSource"
}
];
//# sourceMappingURL=v1EnvVar.js.map
/***/ }),
/***/ 17205:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1EnvVarSource = void 0;
/**
* EnvVarSource represents a source for the value of an EnvVar.
*/
class V1EnvVarSource {
static getAttributeTypeMap() {
return V1EnvVarSource.attributeTypeMap;
}
}
exports.V1EnvVarSource = V1EnvVarSource;
V1EnvVarSource.discriminator = undefined;
V1EnvVarSource.attributeTypeMap = [
{
"name": "configMapKeyRef",
"baseName": "configMapKeyRef",
"type": "V1ConfigMapKeySelector"
},
{
"name": "fieldRef",
"baseName": "fieldRef",
"type": "V1ObjectFieldSelector"
},
{
"name": "resourceFieldRef",
"baseName": "resourceFieldRef",
"type": "V1ResourceFieldSelector"
},
{
"name": "secretKeyRef",
"baseName": "secretKeyRef",
"type": "V1SecretKeySelector"
}
];
//# sourceMappingURL=v1EnvVarSource.js.map
/***/ }),
/***/ 32671:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1EphemeralContainer = void 0;
/**
* An EphemeralContainer is a container that may be added temporarily to an existing pod for user-initiated activities such as debugging. Ephemeral containers have no resource or scheduling guarantees, and they will not be restarted when they exit or when a pod is removed or restarted. If an ephemeral container causes a pod to exceed its resource allocation, the pod may be evicted. Ephemeral containers may not be added by directly updating the pod spec. They must be added via the pod\'s ephemeralcontainers subresource, and they will appear in the pod spec once added. This is an alpha feature enabled by the EphemeralContainers feature flag.
*/
class V1EphemeralContainer {
static getAttributeTypeMap() {
return V1EphemeralContainer.attributeTypeMap;
}
}
exports.V1EphemeralContainer = V1EphemeralContainer;
V1EphemeralContainer.discriminator = undefined;
V1EphemeralContainer.attributeTypeMap = [
{
"name": "args",
"baseName": "args",
"type": "Array"
},
{
"name": "command",
"baseName": "command",
"type": "Array"
},
{
"name": "env",
"baseName": "env",
"type": "Array"
},
{
"name": "envFrom",
"baseName": "envFrom",
"type": "Array"
},
{
"name": "image",
"baseName": "image",
"type": "string"
},
{
"name": "imagePullPolicy",
"baseName": "imagePullPolicy",
"type": "string"
},
{
"name": "lifecycle",
"baseName": "lifecycle",
"type": "V1Lifecycle"
},
{
"name": "livenessProbe",
"baseName": "livenessProbe",
"type": "V1Probe"
},
{
"name": "name",
"baseName": "name",
"type": "string"
},
{
"name": "ports",
"baseName": "ports",
"type": "Array"
},
{
"name": "readinessProbe",
"baseName": "readinessProbe",
"type": "V1Probe"
},
{
"name": "resources",
"baseName": "resources",
"type": "V1ResourceRequirements"
},
{
"name": "securityContext",
"baseName": "securityContext",
"type": "V1SecurityContext"
},
{
"name": "startupProbe",
"baseName": "startupProbe",
"type": "V1Probe"
},
{
"name": "stdin",
"baseName": "stdin",
"type": "boolean"
},
{
"name": "stdinOnce",
"baseName": "stdinOnce",
"type": "boolean"
},
{
"name": "targetContainerName",
"baseName": "targetContainerName",
"type": "string"
},
{
"name": "terminationMessagePath",
"baseName": "terminationMessagePath",
"type": "string"
},
{
"name": "terminationMessagePolicy",
"baseName": "terminationMessagePolicy",
"type": "string"
},
{
"name": "tty",
"baseName": "tty",
"type": "boolean"
},
{
"name": "volumeDevices",
"baseName": "volumeDevices",
"type": "Array"
},
{
"name": "volumeMounts",
"baseName": "volumeMounts",
"type": "Array"
},
{
"name": "workingDir",
"baseName": "workingDir",
"type": "string"
}
];
//# sourceMappingURL=v1EphemeralContainer.js.map
/***/ }),
/***/ 90017:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1EphemeralVolumeSource = void 0;
/**
* Represents an ephemeral volume that is handled by a normal storage driver.
*/
class V1EphemeralVolumeSource {
static getAttributeTypeMap() {
return V1EphemeralVolumeSource.attributeTypeMap;
}
}
exports.V1EphemeralVolumeSource = V1EphemeralVolumeSource;
V1EphemeralVolumeSource.discriminator = undefined;
V1EphemeralVolumeSource.attributeTypeMap = [
{
"name": "volumeClaimTemplate",
"baseName": "volumeClaimTemplate",
"type": "V1PersistentVolumeClaimTemplate"
}
];
//# sourceMappingURL=v1EphemeralVolumeSource.js.map
/***/ }),
/***/ 97764:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1EventSource = void 0;
/**
* EventSource contains information for an event.
*/
class V1EventSource {
static getAttributeTypeMap() {
return V1EventSource.attributeTypeMap;
}
}
exports.V1EventSource = V1EventSource;
V1EventSource.discriminator = undefined;
V1EventSource.attributeTypeMap = [
{
"name": "component",
"baseName": "component",
"type": "string"
},
{
"name": "host",
"baseName": "host",
"type": "string"
}
];
//# sourceMappingURL=v1EventSource.js.map
/***/ }),
/***/ 87969:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1Eviction = void 0;
/**
* Eviction evicts a pod from its node subject to certain policies and safety constraints. This is a subresource of Pod. A request to cause such an eviction is created by POSTing to .../pods//evictions.
*/
class V1Eviction {
static getAttributeTypeMap() {
return V1Eviction.attributeTypeMap;
}
}
exports.V1Eviction = V1Eviction;
V1Eviction.discriminator = undefined;
V1Eviction.attributeTypeMap = [
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "deleteOptions",
"baseName": "deleteOptions",
"type": "V1DeleteOptions"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "metadata",
"baseName": "metadata",
"type": "V1ObjectMeta"
}
];
//# sourceMappingURL=v1Eviction.js.map
/***/ }),
/***/ 13313:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1ExecAction = void 0;
/**
* ExecAction describes a \"run in container\" action.
*/
class V1ExecAction {
static getAttributeTypeMap() {
return V1ExecAction.attributeTypeMap;
}
}
exports.V1ExecAction = V1ExecAction;
V1ExecAction.discriminator = undefined;
V1ExecAction.attributeTypeMap = [
{
"name": "command",
"baseName": "command",
"type": "Array"
}
];
//# sourceMappingURL=v1ExecAction.js.map
/***/ }),
/***/ 77213:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1ExternalDocumentation = void 0;
/**
* ExternalDocumentation allows referencing an external resource for extended documentation.
*/
class V1ExternalDocumentation {
static getAttributeTypeMap() {
return V1ExternalDocumentation.attributeTypeMap;
}
}
exports.V1ExternalDocumentation = V1ExternalDocumentation;
V1ExternalDocumentation.discriminator = undefined;
V1ExternalDocumentation.attributeTypeMap = [
{
"name": "description",
"baseName": "description",
"type": "string"
},
{
"name": "url",
"baseName": "url",
"type": "string"
}
];
//# sourceMappingURL=v1ExternalDocumentation.js.map
/***/ }),
/***/ 35093:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1FCVolumeSource = void 0;
/**
* Represents a Fibre Channel volume. Fibre Channel volumes can only be mounted as read/write once. Fibre Channel volumes support ownership management and SELinux relabeling.
*/
class V1FCVolumeSource {
static getAttributeTypeMap() {
return V1FCVolumeSource.attributeTypeMap;
}
}
exports.V1FCVolumeSource = V1FCVolumeSource;
V1FCVolumeSource.discriminator = undefined;
V1FCVolumeSource.attributeTypeMap = [
{
"name": "fsType",
"baseName": "fsType",
"type": "string"
},
{
"name": "lun",
"baseName": "lun",
"type": "number"
},
{
"name": "readOnly",
"baseName": "readOnly",
"type": "boolean"
},
{
"name": "targetWWNs",
"baseName": "targetWWNs",
"type": "Array"
},
{
"name": "wwids",
"baseName": "wwids",
"type": "Array"
}
];
//# sourceMappingURL=v1FCVolumeSource.js.map
/***/ }),
/***/ 91874:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1FlexPersistentVolumeSource = void 0;
/**
* FlexPersistentVolumeSource represents a generic persistent volume resource that is provisioned/attached using an exec based plugin.
*/
class V1FlexPersistentVolumeSource {
static getAttributeTypeMap() {
return V1FlexPersistentVolumeSource.attributeTypeMap;
}
}
exports.V1FlexPersistentVolumeSource = V1FlexPersistentVolumeSource;
V1FlexPersistentVolumeSource.discriminator = undefined;
V1FlexPersistentVolumeSource.attributeTypeMap = [
{
"name": "driver",
"baseName": "driver",
"type": "string"
},
{
"name": "fsType",
"baseName": "fsType",
"type": "string"
},
{
"name": "options",
"baseName": "options",
"type": "{ [key: string]: string; }"
},
{
"name": "readOnly",
"baseName": "readOnly",
"type": "boolean"
},
{
"name": "secretRef",
"baseName": "secretRef",
"type": "V1SecretReference"
}
];
//# sourceMappingURL=v1FlexPersistentVolumeSource.js.map
/***/ }),
/***/ 16690:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1FlexVolumeSource = void 0;
/**
* FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin.
*/
class V1FlexVolumeSource {
static getAttributeTypeMap() {
return V1FlexVolumeSource.attributeTypeMap;
}
}
exports.V1FlexVolumeSource = V1FlexVolumeSource;
V1FlexVolumeSource.discriminator = undefined;
V1FlexVolumeSource.attributeTypeMap = [
{
"name": "driver",
"baseName": "driver",
"type": "string"
},
{
"name": "fsType",
"baseName": "fsType",
"type": "string"
},
{
"name": "options",
"baseName": "options",
"type": "{ [key: string]: string; }"
},
{
"name": "readOnly",
"baseName": "readOnly",
"type": "boolean"
},
{
"name": "secretRef",
"baseName": "secretRef",
"type": "V1LocalObjectReference"
}
];
//# sourceMappingURL=v1FlexVolumeSource.js.map
/***/ }),
/***/ 10414:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1FlockerVolumeSource = void 0;
/**
* Represents a Flocker volume mounted by the Flocker agent. One and only one of datasetName and datasetUUID should be set. Flocker volumes do not support ownership management or SELinux relabeling.
*/
class V1FlockerVolumeSource {
static getAttributeTypeMap() {
return V1FlockerVolumeSource.attributeTypeMap;
}
}
exports.V1FlockerVolumeSource = V1FlockerVolumeSource;
V1FlockerVolumeSource.discriminator = undefined;
V1FlockerVolumeSource.attributeTypeMap = [
{
"name": "datasetName",
"baseName": "datasetName",
"type": "string"
},
{
"name": "datasetUUID",
"baseName": "datasetUUID",
"type": "string"
}
];
//# sourceMappingURL=v1FlockerVolumeSource.js.map
/***/ }),
/***/ 3439:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1ForZone = void 0;
/**
* ForZone provides information about which zones should consume this endpoint.
*/
class V1ForZone {
static getAttributeTypeMap() {
return V1ForZone.attributeTypeMap;
}
}
exports.V1ForZone = V1ForZone;
V1ForZone.discriminator = undefined;
V1ForZone.attributeTypeMap = [
{
"name": "name",
"baseName": "name",
"type": "string"
}
];
//# sourceMappingURL=v1ForZone.js.map
/***/ }),
/***/ 1016:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1GCEPersistentDiskVolumeSource = void 0;
/**
* Represents a Persistent Disk resource in Google Compute Engine. A GCE PD must exist before mounting to a container. The disk must also be in the same GCE project and zone as the kubelet. A GCE PD can only be mounted as read/write once or read-only many times. GCE PDs support ownership management and SELinux relabeling.
*/
class V1GCEPersistentDiskVolumeSource {
static getAttributeTypeMap() {
return V1GCEPersistentDiskVolumeSource.attributeTypeMap;
}
}
exports.V1GCEPersistentDiskVolumeSource = V1GCEPersistentDiskVolumeSource;
V1GCEPersistentDiskVolumeSource.discriminator = undefined;
V1GCEPersistentDiskVolumeSource.attributeTypeMap = [
{
"name": "fsType",
"baseName": "fsType",
"type": "string"
},
{
"name": "partition",
"baseName": "partition",
"type": "number"
},
{
"name": "pdName",
"baseName": "pdName",
"type": "string"
},
{
"name": "readOnly",
"baseName": "readOnly",
"type": "boolean"
}
];
//# sourceMappingURL=v1GCEPersistentDiskVolumeSource.js.map
/***/ }),
/***/ 27584:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1GitRepoVolumeSource = void 0;
/**
* Represents a volume that is populated with the contents of a git repository. Git repo volumes do not support ownership management. Git repo volumes support SELinux relabeling. DEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir into the Pod\'s container.
*/
class V1GitRepoVolumeSource {
static getAttributeTypeMap() {
return V1GitRepoVolumeSource.attributeTypeMap;
}
}
exports.V1GitRepoVolumeSource = V1GitRepoVolumeSource;
V1GitRepoVolumeSource.discriminator = undefined;
V1GitRepoVolumeSource.attributeTypeMap = [
{
"name": "directory",
"baseName": "directory",
"type": "string"
},
{
"name": "repository",
"baseName": "repository",
"type": "string"
},
{
"name": "revision",
"baseName": "revision",
"type": "string"
}
];
//# sourceMappingURL=v1GitRepoVolumeSource.js.map
/***/ }),
/***/ 97617:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1GlusterfsPersistentVolumeSource = void 0;
/**
* Represents a Glusterfs mount that lasts the lifetime of a pod. Glusterfs volumes do not support ownership management or SELinux relabeling.
*/
class V1GlusterfsPersistentVolumeSource {
static getAttributeTypeMap() {
return V1GlusterfsPersistentVolumeSource.attributeTypeMap;
}
}
exports.V1GlusterfsPersistentVolumeSource = V1GlusterfsPersistentVolumeSource;
V1GlusterfsPersistentVolumeSource.discriminator = undefined;
V1GlusterfsPersistentVolumeSource.attributeTypeMap = [
{
"name": "endpoints",
"baseName": "endpoints",
"type": "string"
},
{
"name": "endpointsNamespace",
"baseName": "endpointsNamespace",
"type": "string"
},
{
"name": "path",
"baseName": "path",
"type": "string"
},
{
"name": "readOnly",
"baseName": "readOnly",
"type": "boolean"
}
];
//# sourceMappingURL=v1GlusterfsPersistentVolumeSource.js.map
/***/ }),
/***/ 37426:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1GlusterfsVolumeSource = void 0;
/**
* Represents a Glusterfs mount that lasts the lifetime of a pod. Glusterfs volumes do not support ownership management or SELinux relabeling.
*/
class V1GlusterfsVolumeSource {
static getAttributeTypeMap() {
return V1GlusterfsVolumeSource.attributeTypeMap;
}
}
exports.V1GlusterfsVolumeSource = V1GlusterfsVolumeSource;
V1GlusterfsVolumeSource.discriminator = undefined;
V1GlusterfsVolumeSource.attributeTypeMap = [
{
"name": "endpoints",
"baseName": "endpoints",
"type": "string"
},
{
"name": "path",
"baseName": "path",
"type": "string"
},
{
"name": "readOnly",
"baseName": "readOnly",
"type": "boolean"
}
];
//# sourceMappingURL=v1GlusterfsVolumeSource.js.map
/***/ }),
/***/ 87855:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1GroupVersionForDiscovery = void 0;
/**
* GroupVersion contains the \"group/version\" and \"version\" string of a version. It is made a struct to keep extensibility.
*/
class V1GroupVersionForDiscovery {
static getAttributeTypeMap() {
return V1GroupVersionForDiscovery.attributeTypeMap;
}
}
exports.V1GroupVersionForDiscovery = V1GroupVersionForDiscovery;
V1GroupVersionForDiscovery.discriminator = undefined;
V1GroupVersionForDiscovery.attributeTypeMap = [
{
"name": "groupVersion",
"baseName": "groupVersion",
"type": "string"
},
{
"name": "version",
"baseName": "version",
"type": "string"
}
];
//# sourceMappingURL=v1GroupVersionForDiscovery.js.map
/***/ }),
/***/ 16636:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1HTTPGetAction = void 0;
/**
* HTTPGetAction describes an action based on HTTP Get requests.
*/
class V1HTTPGetAction {
static getAttributeTypeMap() {
return V1HTTPGetAction.attributeTypeMap;
}
}
exports.V1HTTPGetAction = V1HTTPGetAction;
V1HTTPGetAction.discriminator = undefined;
V1HTTPGetAction.attributeTypeMap = [
{
"name": "host",
"baseName": "host",
"type": "string"
},
{
"name": "httpHeaders",
"baseName": "httpHeaders",
"type": "Array"
},
{
"name": "path",
"baseName": "path",
"type": "string"
},
{
"name": "port",
"baseName": "port",
"type": "IntOrString"
},
{
"name": "scheme",
"baseName": "scheme",
"type": "string"
}
];
//# sourceMappingURL=v1HTTPGetAction.js.map
/***/ }),
/***/ 3437:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1HTTPHeader = void 0;
/**
* HTTPHeader describes a custom header to be used in HTTP probes
*/
class V1HTTPHeader {
static getAttributeTypeMap() {
return V1HTTPHeader.attributeTypeMap;
}
}
exports.V1HTTPHeader = V1HTTPHeader;
V1HTTPHeader.discriminator = undefined;
V1HTTPHeader.attributeTypeMap = [
{
"name": "name",
"baseName": "name",
"type": "string"
},
{
"name": "value",
"baseName": "value",
"type": "string"
}
];
//# sourceMappingURL=v1HTTPHeader.js.map
/***/ }),
/***/ 86769:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1HTTPIngressPath = void 0;
/**
* HTTPIngressPath associates a path with a backend. Incoming urls matching the path are forwarded to the backend.
*/
class V1HTTPIngressPath {
static getAttributeTypeMap() {
return V1HTTPIngressPath.attributeTypeMap;
}
}
exports.V1HTTPIngressPath = V1HTTPIngressPath;
V1HTTPIngressPath.discriminator = undefined;
V1HTTPIngressPath.attributeTypeMap = [
{
"name": "backend",
"baseName": "backend",
"type": "V1IngressBackend"
},
{
"name": "path",
"baseName": "path",
"type": "string"
},
{
"name": "pathType",
"baseName": "pathType",
"type": "string"
}
];
//# sourceMappingURL=v1HTTPIngressPath.js.map
/***/ }),
/***/ 56219:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1HTTPIngressRuleValue = void 0;
/**
* HTTPIngressRuleValue is a list of http selectors pointing to backends. In the example: http:///? -> backend where where parts of the url correspond to RFC 3986, this resource will be used to match against everything after the last \'/\' and before the first \'?\' or \'#\'.
*/
class V1HTTPIngressRuleValue {
static getAttributeTypeMap() {
return V1HTTPIngressRuleValue.attributeTypeMap;
}
}
exports.V1HTTPIngressRuleValue = V1HTTPIngressRuleValue;
V1HTTPIngressRuleValue.discriminator = undefined;
V1HTTPIngressRuleValue.attributeTypeMap = [
{
"name": "paths",
"baseName": "paths",
"type": "Array"
}
];
//# sourceMappingURL=v1HTTPIngressRuleValue.js.map
/***/ }),
/***/ 95179:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1Handler = void 0;
/**
* Handler defines a specific action that should be taken
*/
class V1Handler {
static getAttributeTypeMap() {
return V1Handler.attributeTypeMap;
}
}
exports.V1Handler = V1Handler;
V1Handler.discriminator = undefined;
V1Handler.attributeTypeMap = [
{
"name": "exec",
"baseName": "exec",
"type": "V1ExecAction"
},
{
"name": "httpGet",
"baseName": "httpGet",
"type": "V1HTTPGetAction"
},
{
"name": "tcpSocket",
"baseName": "tcpSocket",
"type": "V1TCPSocketAction"
}
];
//# sourceMappingURL=v1Handler.js.map
/***/ }),
/***/ 93652:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1HorizontalPodAutoscaler = void 0;
/**
* configuration of a horizontal pod autoscaler.
*/
class V1HorizontalPodAutoscaler {
static getAttributeTypeMap() {
return V1HorizontalPodAutoscaler.attributeTypeMap;
}
}
exports.V1HorizontalPodAutoscaler = V1HorizontalPodAutoscaler;
V1HorizontalPodAutoscaler.discriminator = undefined;
V1HorizontalPodAutoscaler.attributeTypeMap = [
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "metadata",
"baseName": "metadata",
"type": "V1ObjectMeta"
},
{
"name": "spec",
"baseName": "spec",
"type": "V1HorizontalPodAutoscalerSpec"
},
{
"name": "status",
"baseName": "status",
"type": "V1HorizontalPodAutoscalerStatus"
}
];
//# sourceMappingURL=v1HorizontalPodAutoscaler.js.map
/***/ }),
/***/ 17024:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1HorizontalPodAutoscalerList = void 0;
/**
* list of horizontal pod autoscaler objects.
*/
class V1HorizontalPodAutoscalerList {
static getAttributeTypeMap() {
return V1HorizontalPodAutoscalerList.attributeTypeMap;
}
}
exports.V1HorizontalPodAutoscalerList = V1HorizontalPodAutoscalerList;
V1HorizontalPodAutoscalerList.discriminator = undefined;
V1HorizontalPodAutoscalerList.attributeTypeMap = [
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "items",
"baseName": "items",
"type": "Array"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "metadata",
"baseName": "metadata",
"type": "V1ListMeta"
}
];
//# sourceMappingURL=v1HorizontalPodAutoscalerList.js.map
/***/ }),
/***/ 49823:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1HorizontalPodAutoscalerSpec = void 0;
/**
* specification of a horizontal pod autoscaler.
*/
class V1HorizontalPodAutoscalerSpec {
static getAttributeTypeMap() {
return V1HorizontalPodAutoscalerSpec.attributeTypeMap;
}
}
exports.V1HorizontalPodAutoscalerSpec = V1HorizontalPodAutoscalerSpec;
V1HorizontalPodAutoscalerSpec.discriminator = undefined;
V1HorizontalPodAutoscalerSpec.attributeTypeMap = [
{
"name": "maxReplicas",
"baseName": "maxReplicas",
"type": "number"
},
{
"name": "minReplicas",
"baseName": "minReplicas",
"type": "number"
},
{
"name": "scaleTargetRef",
"baseName": "scaleTargetRef",
"type": "V1CrossVersionObjectReference"
},
{
"name": "targetCPUUtilizationPercentage",
"baseName": "targetCPUUtilizationPercentage",
"type": "number"
}
];
//# sourceMappingURL=v1HorizontalPodAutoscalerSpec.js.map
/***/ }),
/***/ 50910:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1HorizontalPodAutoscalerStatus = void 0;
/**
* current status of a horizontal pod autoscaler
*/
class V1HorizontalPodAutoscalerStatus {
static getAttributeTypeMap() {
return V1HorizontalPodAutoscalerStatus.attributeTypeMap;
}
}
exports.V1HorizontalPodAutoscalerStatus = V1HorizontalPodAutoscalerStatus;
V1HorizontalPodAutoscalerStatus.discriminator = undefined;
V1HorizontalPodAutoscalerStatus.attributeTypeMap = [
{
"name": "currentCPUUtilizationPercentage",
"baseName": "currentCPUUtilizationPercentage",
"type": "number"
},
{
"name": "currentReplicas",
"baseName": "currentReplicas",
"type": "number"
},
{
"name": "desiredReplicas",
"baseName": "desiredReplicas",
"type": "number"
},
{
"name": "lastScaleTime",
"baseName": "lastScaleTime",
"type": "Date"
},
{
"name": "observedGeneration",
"baseName": "observedGeneration",
"type": "number"
}
];
//# sourceMappingURL=v1HorizontalPodAutoscalerStatus.js.map
/***/ }),
/***/ 72796:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1HostAlias = void 0;
/**
* HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod\'s hosts file.
*/
class V1HostAlias {
static getAttributeTypeMap() {
return V1HostAlias.attributeTypeMap;
}
}
exports.V1HostAlias = V1HostAlias;
V1HostAlias.discriminator = undefined;
V1HostAlias.attributeTypeMap = [
{
"name": "hostnames",
"baseName": "hostnames",
"type": "Array"
},
{
"name": "ip",
"baseName": "ip",
"type": "string"
}
];
//# sourceMappingURL=v1HostAlias.js.map
/***/ }),
/***/ 69225:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1HostPathVolumeSource = void 0;
/**
* Represents a host path mapped into a pod. Host path volumes do not support ownership management or SELinux relabeling.
*/
class V1HostPathVolumeSource {
static getAttributeTypeMap() {
return V1HostPathVolumeSource.attributeTypeMap;
}
}
exports.V1HostPathVolumeSource = V1HostPathVolumeSource;
V1HostPathVolumeSource.discriminator = undefined;
V1HostPathVolumeSource.attributeTypeMap = [
{
"name": "path",
"baseName": "path",
"type": "string"
},
{
"name": "type",
"baseName": "type",
"type": "string"
}
];
//# sourceMappingURL=v1HostPathVolumeSource.js.map
/***/ }),
/***/ 49202:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1IPBlock = void 0;
/**
* IPBlock describes a particular CIDR (Ex. \"192.168.1.1/24\",\"2001:db9::/64\") that is allowed to the pods matched by a NetworkPolicySpec\'s podSelector. The except entry describes CIDRs that should not be included within this rule.
*/
class V1IPBlock {
static getAttributeTypeMap() {
return V1IPBlock.attributeTypeMap;
}
}
exports.V1IPBlock = V1IPBlock;
V1IPBlock.discriminator = undefined;
V1IPBlock.attributeTypeMap = [
{
"name": "cidr",
"baseName": "cidr",
"type": "string"
},
{
"name": "except",
"baseName": "except",
"type": "Array"
}
];
//# sourceMappingURL=v1IPBlock.js.map
/***/ }),
/***/ 83570:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1ISCSIPersistentVolumeSource = void 0;
/**
* ISCSIPersistentVolumeSource represents an ISCSI disk. ISCSI volumes can only be mounted as read/write once. ISCSI volumes support ownership management and SELinux relabeling.
*/
class V1ISCSIPersistentVolumeSource {
static getAttributeTypeMap() {
return V1ISCSIPersistentVolumeSource.attributeTypeMap;
}
}
exports.V1ISCSIPersistentVolumeSource = V1ISCSIPersistentVolumeSource;
V1ISCSIPersistentVolumeSource.discriminator = undefined;
V1ISCSIPersistentVolumeSource.attributeTypeMap = [
{
"name": "chapAuthDiscovery",
"baseName": "chapAuthDiscovery",
"type": "boolean"
},
{
"name": "chapAuthSession",
"baseName": "chapAuthSession",
"type": "boolean"
},
{
"name": "fsType",
"baseName": "fsType",
"type": "string"
},
{
"name": "initiatorName",
"baseName": "initiatorName",
"type": "string"
},
{
"name": "iqn",
"baseName": "iqn",
"type": "string"
},
{
"name": "iscsiInterface",
"baseName": "iscsiInterface",
"type": "string"
},
{
"name": "lun",
"baseName": "lun",
"type": "number"
},
{
"name": "portals",
"baseName": "portals",
"type": "Array"
},
{
"name": "readOnly",
"baseName": "readOnly",
"type": "boolean"
},
{
"name": "secretRef",
"baseName": "secretRef",
"type": "V1SecretReference"
},
{
"name": "targetPortal",
"baseName": "targetPortal",
"type": "string"
}
];
//# sourceMappingURL=v1ISCSIPersistentVolumeSource.js.map
/***/ }),
/***/ 68021:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1ISCSIVolumeSource = void 0;
/**
* Represents an ISCSI disk. ISCSI volumes can only be mounted as read/write once. ISCSI volumes support ownership management and SELinux relabeling.
*/
class V1ISCSIVolumeSource {
static getAttributeTypeMap() {
return V1ISCSIVolumeSource.attributeTypeMap;
}
}
exports.V1ISCSIVolumeSource = V1ISCSIVolumeSource;
V1ISCSIVolumeSource.discriminator = undefined;
V1ISCSIVolumeSource.attributeTypeMap = [
{
"name": "chapAuthDiscovery",
"baseName": "chapAuthDiscovery",
"type": "boolean"
},
{
"name": "chapAuthSession",
"baseName": "chapAuthSession",
"type": "boolean"
},
{
"name": "fsType",
"baseName": "fsType",
"type": "string"
},
{
"name": "initiatorName",
"baseName": "initiatorName",
"type": "string"
},
{
"name": "iqn",
"baseName": "iqn",
"type": "string"
},
{
"name": "iscsiInterface",
"baseName": "iscsiInterface",
"type": "string"
},
{
"name": "lun",
"baseName": "lun",
"type": "number"
},
{
"name": "portals",
"baseName": "portals",
"type": "Array"
},
{
"name": "readOnly",
"baseName": "readOnly",
"type": "boolean"
},
{
"name": "secretRef",
"baseName": "secretRef",
"type": "V1LocalObjectReference"
},
{
"name": "targetPortal",
"baseName": "targetPortal",
"type": "string"
}
];
//# sourceMappingURL=v1ISCSIVolumeSource.js.map
/***/ }),
/***/ 32492:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1Ingress = void 0;
/**
* Ingress is a collection of rules that allow inbound connections to reach the endpoints defined by a backend. An Ingress can be configured to give services externally-reachable urls, load balance traffic, terminate SSL, offer name based virtual hosting etc.
*/
class V1Ingress {
static getAttributeTypeMap() {
return V1Ingress.attributeTypeMap;
}
}
exports.V1Ingress = V1Ingress;
V1Ingress.discriminator = undefined;
V1Ingress.attributeTypeMap = [
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "metadata",
"baseName": "metadata",
"type": "V1ObjectMeta"
},
{
"name": "spec",
"baseName": "spec",
"type": "V1IngressSpec"
},
{
"name": "status",
"baseName": "status",
"type": "V1IngressStatus"
}
];
//# sourceMappingURL=v1Ingress.js.map
/***/ }),
/***/ 44340:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1IngressBackend = void 0;
/**
* IngressBackend describes all endpoints for a given service and port.
*/
class V1IngressBackend {
static getAttributeTypeMap() {
return V1IngressBackend.attributeTypeMap;
}
}
exports.V1IngressBackend = V1IngressBackend;
V1IngressBackend.discriminator = undefined;
V1IngressBackend.attributeTypeMap = [
{
"name": "resource",
"baseName": "resource",
"type": "V1TypedLocalObjectReference"
},
{
"name": "service",
"baseName": "service",
"type": "V1IngressServiceBackend"
}
];
//# sourceMappingURL=v1IngressBackend.js.map
/***/ }),
/***/ 93865:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1IngressClass = void 0;
/**
* IngressClass represents the class of the Ingress, referenced by the Ingress Spec. The `ingressclass.kubernetes.io/is-default-class` annotation can be used to indicate that an IngressClass should be considered default. When a single IngressClass resource has this annotation set to true, new Ingress resources without a class specified will be assigned this default class.
*/
class V1IngressClass {
static getAttributeTypeMap() {
return V1IngressClass.attributeTypeMap;
}
}
exports.V1IngressClass = V1IngressClass;
V1IngressClass.discriminator = undefined;
V1IngressClass.attributeTypeMap = [
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "metadata",
"baseName": "metadata",
"type": "V1ObjectMeta"
},
{
"name": "spec",
"baseName": "spec",
"type": "V1IngressClassSpec"
}
];
//# sourceMappingURL=v1IngressClass.js.map
/***/ }),
/***/ 76125:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1IngressClassList = void 0;
/**
* IngressClassList is a collection of IngressClasses.
*/
class V1IngressClassList {
static getAttributeTypeMap() {
return V1IngressClassList.attributeTypeMap;
}
}
exports.V1IngressClassList = V1IngressClassList;
V1IngressClassList.discriminator = undefined;
V1IngressClassList.attributeTypeMap = [
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "items",
"baseName": "items",
"type": "Array"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "metadata",
"baseName": "metadata",
"type": "V1ListMeta"
}
];
//# sourceMappingURL=v1IngressClassList.js.map
/***/ }),
/***/ 76672:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1IngressClassParametersReference = void 0;
/**
* IngressClassParametersReference identifies an API object. This can be used to specify a cluster or namespace-scoped resource.
*/
class V1IngressClassParametersReference {
static getAttributeTypeMap() {
return V1IngressClassParametersReference.attributeTypeMap;
}
}
exports.V1IngressClassParametersReference = V1IngressClassParametersReference;
V1IngressClassParametersReference.discriminator = undefined;
V1IngressClassParametersReference.attributeTypeMap = [
{
"name": "apiGroup",
"baseName": "apiGroup",
"type": "string"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "name",
"baseName": "name",
"type": "string"
},
{
"name": "namespace",
"baseName": "namespace",
"type": "string"
},
{
"name": "scope",
"baseName": "scope",
"type": "string"
}
];
//# sourceMappingURL=v1IngressClassParametersReference.js.map
/***/ }),
/***/ 92069:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1IngressClassSpec = void 0;
/**
* IngressClassSpec provides information about the class of an Ingress.
*/
class V1IngressClassSpec {
static getAttributeTypeMap() {
return V1IngressClassSpec.attributeTypeMap;
}
}
exports.V1IngressClassSpec = V1IngressClassSpec;
V1IngressClassSpec.discriminator = undefined;
V1IngressClassSpec.attributeTypeMap = [
{
"name": "controller",
"baseName": "controller",
"type": "string"
},
{
"name": "parameters",
"baseName": "parameters",
"type": "V1IngressClassParametersReference"
}
];
//# sourceMappingURL=v1IngressClassSpec.js.map
/***/ }),
/***/ 43693:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1IngressList = void 0;
/**
* IngressList is a collection of Ingress.
*/
class V1IngressList {
static getAttributeTypeMap() {
return V1IngressList.attributeTypeMap;
}
}
exports.V1IngressList = V1IngressList;
V1IngressList.discriminator = undefined;
V1IngressList.attributeTypeMap = [
{
"name": "apiVersion",
"baseName": "apiVersion",
"type": "string"
},
{
"name": "items",
"baseName": "items",
"type": "Array"
},
{
"name": "kind",
"baseName": "kind",
"type": "string"
},
{
"name": "metadata",
"baseName": "metadata",
"type": "V1ListMeta"
}
];
//# sourceMappingURL=v1IngressList.js.map
/***/ }),
/***/ 89541:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1IngressRule = void 0;
/**
* IngressRule represents the rules mapping the paths under a specified host to the related backend services. Incoming requests are first evaluated for a host match, then routed to the backend associated with the matching IngressRuleValue.
*/
class V1IngressRule {
static getAttributeTypeMap() {
return V1IngressRule.attributeTypeMap;
}
}
exports.V1IngressRule = V1IngressRule;
V1IngressRule.discriminator = undefined;
V1IngressRule.attributeTypeMap = [
{
"name": "host",
"baseName": "host",
"type": "string"
},
{
"name": "http",
"baseName": "http",
"type": "V1HTTPIngressRuleValue"
}
];
//# sourceMappingURL=v1IngressRule.js.map
/***/ }),
/***/ 62476:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1IngressServiceBackend = void 0;
/**
* IngressServiceBackend references a Kubernetes Service as a Backend.
*/
class V1IngressServiceBackend {
static getAttributeTypeMap() {
return V1IngressServiceBackend.attributeTypeMap;
}
}
exports.V1IngressServiceBackend = V1IngressServiceBackend;
V1IngressServiceBackend.discriminator = undefined;
V1IngressServiceBackend.attributeTypeMap = [
{
"name": "name",
"baseName": "name",
"type": "string"
},
{
"name": "port",
"baseName": "port",
"type": "V1ServiceBackendPort"
}
];
//# sourceMappingURL=v1IngressServiceBackend.js.map
/***/ }),
/***/ 59689:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1IngressSpec = void 0;
/**
* IngressSpec describes the Ingress the user wishes to exist.
*/
class V1IngressSpec {
static getAttributeTypeMap() {
return V1IngressSpec.attributeTypeMap;
}
}
exports.V1IngressSpec = V1IngressSpec;
V1IngressSpec.discriminator = undefined;
V1IngressSpec.attributeTypeMap = [
{
"name": "defaultBackend",
"baseName": "defaultBackend",
"type": "V1IngressBackend"
},
{
"name": "ingressClassName",
"baseName": "ingressClassName",
"type": "string"
},
{
"name": "rules",
"baseName": "rules",
"type": "Array"
},
{
"name": "tls",
"baseName": "tls",
"type": "Array"
}
];
//# sourceMappingURL=v1IngressSpec.js.map
/***/ }),
/***/ 45830:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1IngressStatus = void 0;
/**
* IngressStatus describe the current state of the Ingress.
*/
class V1IngressStatus {
static getAttributeTypeMap() {
return V1IngressStatus.attributeTypeMap;
}
}
exports.V1IngressStatus = V1IngressStatus;
V1IngressStatus.discriminator = undefined;
V1IngressStatus.attributeTypeMap = [
{
"name": "loadBalancer",
"baseName": "loadBalancer",
"type": "V1LoadBalancerStatus"
}
];
//# sourceMappingURL=v1IngressStatus.js.map
/***/ }),
/***/ 23037:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1IngressTLS = void 0;
/**
* IngressTLS describes the transport layer security associated with an Ingress.
*/
class V1IngressTLS {
static getAttributeTypeMap() {
return V1IngressTLS.attributeTypeMap;
}
}
exports.V1IngressTLS = V1IngressTLS;
V1IngressTLS.discriminator = undefined;
V1IngressTLS.attributeTypeMap = [
{
"name": "hosts",
"baseName": "hosts",
"type": "Array"
},
{
"name": "secretName",
"baseName": "secretName",
"type": "string"
}
];
//# sourceMappingURL=v1IngressTLS.js.map
/***/ }),
/***/ 63580:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.22.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.V1JSONSchemaProps = void 0;
/**
* JSONSchemaProps is a JSON-Schema following Specification Draft 4 (http://json-schema.org/).
*/
class V1JSONSchemaProps {
static getAttributeTypeMap() {
return V1JSONSchemaProps.attributeTypeMap;
}
}
exports.V1JSONSchemaProps = V1JSONSchemaProps;
V1JSONSchemaProps.discriminator = undefined;
V1JSONSchemaProps.attributeTypeMap = [
{
"name": "$ref",
"baseName": "$ref",
"type": "string"
},
{
"name": "$schema",
"baseName": "$schema",
"type": "string"
},
{
"name": "additionalItems",
"baseName": "additionalItems",
"type": "object"
},
{
"name": "additionalProperties",
"baseName": "additionalProperties",
"type": "object"
},
{
"name": "allOf",
"baseName": "allOf",
"type": "Array"
},
{
"name": "anyOf",
"baseName": "anyOf",
"type": "Array"
},
{
"name": "_default",
"baseName": "default",
"type": "object"
},
{
"name": "definitions",
"baseName": "definitions",
"type": "{ [key: string]: V1JSONSchemaProps; }"
},
{
"name": "dependencies",
"baseName": "dependencies",
"type": "{ [key: string]: object; }"
},
{
"name": "description",
"baseName": "description",
"type": "string"
},
{
"name": "_enum",
"baseName": "enum",
"type": "Array